:root {
  --primary-color: #2c2c2c;
  --secondary-color: #8b0000;
  --text-color: #f5f5f5;
  --background-color: #1a1a1a;
  --accent-color: #4a0404;
  --gradient-start: #2c2c2c;
  --gradient-end: #3c3c3c;
  --card-bg: rgba(44, 44, 44, 0.9);
  --overlay-color: rgba(0, 0, 0, 0.5);
  --text-muted: #b0b0b0;
  --highlight-color: #e0e0e0;
}

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

body {
  font-family: "EB Garamond", serif;
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* Profile Image */
.profile-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--secondary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.05);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom Cursor */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--secondary-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-follower {
  width: 30px;
  height: 30px;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.1s;
  mix-blend-mode: difference;
}

/* Header & Navigation */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(44, 44, 44, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-family: "Playfair Display", serif !important;
  font-size: 2.5rem;
  font-weight: 700;
  color: #faf6f2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  letter-spacing: 3px;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s, text-shadow 0.2s;
}

.logo:hover {
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--highlight-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .header {
    transition: transform 0.3s ease;
  }

  .header.hidden {
    transform: translateY(-100%);
  }

  .nav {
    padding: 0.5rem 5%;
  }

  .logo {
    font-size: 1.8rem;
  }

  .hamburger {
    display: block;
    z-index: 1001;
    padding: 0.4rem;
  }

  .hamburger span {
    width: 16px;
    height: 2px;
    margin: 3px 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: -250px;
    left: auto;
    width: 250px;
    height: auto;
    max-height: 300px;
    background: rgba(44, 44, 44, 0.98);
    padding: 60px 1rem 1rem 1rem;
    flex-direction: column;
    gap: 0.8rem;
    transition: right 0.3s ease;
    border-radius: 0 0 0 10px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    display: flex;
    right: 0;
  }

  .nav-links li {
    padding: 0.5rem 0;
  }

  .nav-links a {
    font-size: 0.95rem;
    display: block;
    padding: 0.3rem 0;
  }

  .about-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .book-card {
    max-width: 90%;
    padding: 1.5rem;
    margin: 0 auto 1.5rem auto;
  }

  .social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .social-link {
    font-size: 2rem;
  }

  /* Font adjustments for mobile */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1.2rem;
    padding: 0 1rem;
  }

  /* Aesthetic borders for specific text */
  .about-content p,
  .book-description {
    border: 1px solid var(--highlight-color);
    border-radius: 8px;
    padding: 0.8rem;
    margin: 0.8rem 0;
    font-size: 1.1rem;
  }

  /* Gallery section adjustments */
  .gallery-grid {
    padding: 1rem;
  }

  .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  /* Minimize gaps between sections */
  section {
    margin: 0.5rem 0;
  }

  /* Specific section padding adjustments for mobile */
  .about,
  .books,
  .contact,
  .newsletter,
  .gallery-feed,
  .gallery-hero,
  .books-hero,
  .contact-hero {
    padding: 1.5rem 0;
  }

  .hero {
    padding: 4rem 0;
  }

  .section-title {
    margin-bottom: 1rem;
  }

  .container {
    padding: 0 15px;
  }

  /* Adjust spacing within the contact section */
  .contact-form-container {
    margin-bottom: 1.5rem;
  }

  .social-connect {
    margin-top: 1.5rem;
  }

  .social-links-grid {
    gap: 0.8rem;
  }

  .contact-grid {
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem;
  }

  .newsletter {
    padding: 2rem 0;
    margin: 2rem auto 0 auto;
  }

  .newsletter-form {
    gap: 0.8rem;
  }
}

/* Add padding to main content to prevent header overlap */
main {
  padding-top: 4rem;
}

@media (max-width: 768px) {
  main {
    padding-top: 3.5rem;
  }
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%
  );
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("texture.png");
  opacity: 0.05;
  pointer-events: none;
}

.hero-content {
  padding: 2rem;
  z-index: 1;
}

.hero h1 {
  font-family: "EB Garamond", serif;
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 3px;
  color: var(--text-color);
}

.subtitle {
  font-size: 2rem;
  color: var(--highlight-color);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards 0.3s;
  font-weight: 500;
  letter-spacing: 2px;
}

/* About Section */
.about {
  padding: 8rem 0;
  background: var(--background-color);
  position: relative;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("texture.png");
  opacity: 0.03;
  pointer-events: none;
}

.about h2 {
  font-family: "EB Garamond", serif;
  font-size: 3.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-color);
  letter-spacing: 2px;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.3rem;
  line-height: 1.8;
  text-align: justify;
  letter-spacing: 0.5px;
  color: var(--text-color);
}

/* Books Section */
.books {
  padding: 8rem 0;
  background: var(--background-color);
  position: relative;
}

.book-card {
  background: #23232b !important;
  padding: 3.5rem 2.5rem;
  border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  text-align: center;
  border: 1px solid rgba(224, 224, 224, 0.1);
  margin: 0 auto 2.5rem auto;
  max-width: 700px;
}

.book-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  border-color: var(--highlight-color);
}

.book-info h3 {
  font-family: "EB Garamond", serif !important;
  font-weight: 600 !important;
  color: #fafafa !important;
  font-size: 3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  font-style: normal !important;
  line-height: 1.1;
}

.book-author {
  font-family: "EB Garamond", serif;
  color: #b0b0b0;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  font-style: italic;
  letter-spacing: 1px;
  display: block;
}

.book-description {
  color: #b0b0b0 !important;
  font-size: 1.13rem;
  margin-bottom: 1.7rem;
  letter-spacing: 0.3px;
}

.book-meta {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.genre,
.release {
  padding: 0.5rem 1.5rem;
  background: var(--card-bg);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-color);
  border: 1px solid var(--highlight-color);
}

.book-meta span {
  color: #e0e0e0 !important;
  background: rgba(44, 44, 44, 0.7);
  border-radius: 50px;
  padding: 0.4rem 1.2rem;
  font-size: 0.95rem;
  border: 1px solid #333;
  margin: 0 0.3rem;
}

.amazon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: linear-gradient(90deg, #1a1a1a 0%, #8b0000 100%);
  color: #fff !important;
  border: none !important;
  font-weight: 700;
  font-size: 1.13rem;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  margin-top: 1.2rem;
  text-transform: uppercase;
  border-radius: 50px;
  padding: 1.1rem 2.5rem 1.1rem 2.1rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.amazon-link:hover {
  background: linear-gradient(90deg, #8b0000 0%, #1a1a1a 100%);
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px) scale(1.04);
}

.amazon-link .amazon-icon {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  vertical-align: middle;
  fill: #fff;
}

/* Contact Section */
.contact {
  padding: 8rem 0;
  background: var(--background-color);
  position: relative;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.social-link {
  font-size: 2.5rem;
  color: var(--text-color);
  transition: all 0.3s ease;
  position: relative;
}

.social-link:hover {
  color: var(--highlight-color);
  transform: translateY(-5px) scale(1.1);
}

/* Footer */
footer {
  background: var(--primary-color);
  color: var(--text-color);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--highlight-color);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  opacity: 0.8;
}

.scroll-indicator span {
  font-size: 1rem;
  letter-spacing: 1px;
}

.scroll-indicator i {
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Section Titles */
.section-title {
  font-family: "EB Garamond", serif !important;
  font-weight: 400 !important;
  color: #e0e0e0 !important;
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 2px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--highlight-color);
}

/* Animations */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Books Page Styles */
.books-hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%
  );
  position: relative;
}

.book-showcase {
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  margin-top: 4rem;
  padding: 2rem;
}

.book-cover {
  width: 340px;
  min-width: 260px;
  max-width: 400px;
  aspect-ratio: 2/3;
  background: var(--card-bg);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  border: 1.5px solid var(--highlight-color);
  display: flex;
  align-items: center;
  justify-content: center;
  }

  /* Make the book cover image fit perfectly in the box */
  .actual-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
  }
}

.placeholder-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-family: "EB Garamond", serif;
  font-size: 2.1rem;
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(
    45deg,
    var(--gradient-start),
    var(--gradient-end)
  );
}

.book-details {
  padding: 2rem;
}

/* Newsletter Section - Dark Card Style */
.newsletter {
  padding: 4rem 0;
  background: #23232b;
  text-align: center;
  position: relative;
  overflow: visible;
  margin: 4rem auto 0 auto;
  max-width: 600px;
  border-radius: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.newsletter h2 {
  color: #fff;
  font-size: 2.3rem;
  margin-bottom: 1.2rem;
  letter-spacing: 1.5px;
  font-family: "EB Garamond", serif;
  font-weight: 700;
}

.newsletter p {
  color: #d0d0d0;
  font-size: 1.15rem;
  margin-bottom: 2.2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1 1 200px;
  padding: 1.2rem 1.8rem;
  background: #18181c;
  border: 1px solid #444;
  border-radius: 50px;
  font-size: 1.1rem;
  color: #fff;
  transition: border 0.2s, background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.newsletter-form input::placeholder {
  color: #aaa;
  opacity: 1;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #fff;
  background: #23232b;
}

.newsletter-form button {
  padding: 1.2rem 2.5rem;
  background: #18181c;
  color: #fff;
  border: 1px solid #444;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.newsletter-form button:hover {
  background: #4a0404;
  color: #fff;
  border-color: #8b0000;
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .newsletter {
    padding: 2.5rem 1rem;
    max-width: 98vw;
  }
  .newsletter-form {
    flex-direction: column;
    gap: 0.8rem;
  }
  .newsletter-form button {
    width: 100%;
  }
}

/* Gallery Page Styles */
.gallery-hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%
  );
  position: relative;
}

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--card-bg);
  border: 1px solid var(--highlight-color);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: var(--text-color);
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Instagram Feed */
.instagram-feed {
  padding: 6rem 0;
  background: var(--background-color);
  text-align: center;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.instagram-link:hover {
  background: #c0392b;
  transform: scale(1.05);
}

/* Contact Page Styles */
.contact-hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%
  );
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
  padding: 2rem;
}

.contact-form-container {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--highlight-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--background-color);
  border: 1px solid var(--highlight-color);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-color);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--highlight-color);
  color: var(--primary-color);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.submit-btn:hover {
  background: var(--text-color);
  transform: translateY(-2px);
}

.social-connect {
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--highlight-color);
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--background-color);
  border-radius: 15px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  border: 1px solid var(--highlight-color);
}

.social-card i {
  font-size: 2rem;
}

.social-card:hover {
  transform: translateY(-5px);
  background: var(--highlight-color);
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .book-showcase {
    flex-direction: column;
    gap: 2rem;
  }
  .book-cover {
    width: 220px;
    min-width: 140px;
    max-width: 260px;
  }
  .placeholder-cover {
    font-size: 1.3rem;
    padding: 1.2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .social-links-grid {
    grid-template-columns: 1fr;
  }

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

  .newsletter-form button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .book-showcase {
    flex-direction: column;
    gap: 2rem;
  }
  .book-cover {
    width: 220px;
    min-width: 140px;
    max-width: 260px;
  }
}
