/* Thomas T Wedow - Author Website */
/* Modern, elegant design with stormy atmospheric aesthetic */

:root {
  --color-bg: #0a0f14;
  --color-bg-card: rgba(20, 30, 40, 0.85);
  --color-text: #e8eaed;
  --color-text-muted: #9aa0a6;
  --color-accent: #5c9ece;
  --color-accent-warm: #d4a574;
  --color-border: rgba(255, 255, 255, 0.1);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
}

/* Background with atmospheric overlay */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: url('/images/main-page-background.png') center center / cover no-repeat;
}

.page-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 15, 20, 0.7) 0%, rgba(26, 37, 47, 0.6) 50%, rgba(13, 20, 25, 0.8) 100%);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: var(--color-accent);
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--color-text);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--color-accent);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Book cards */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.book-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: linear-gradient(135deg, #1a252f 0%, #2a3a4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.book-cover-placeholder {
  padding: 2rem;
  text-align: center;
}

.book-cover-placeholder h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-accent);
}

.book-content {
  padding: 1.5rem;
}

.book-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.book-content .subtitle {
  color: var(--color-accent-warm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.book-content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.book-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.theme-tag {
  background: rgba(92, 158, 206, 0.15);
  color: var(--color-accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #4a8ab8;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
}

/* About section */
.about-section {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
  margin: 3rem 0;
}

.author-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.author-photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.about-content .highlight {
  color: var(--color-accent-warm);
  font-weight: 500;
}

/* Press/News section */
.press-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.press-item {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease;
}

.press-item:hover {
  transform: translateX(8px);
}

.press-item .date {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.press-item h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.press-item p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Contact form */
.contact-section {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--color-border);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Newsletter signup */
.newsletter {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--color-border);
  margin: 3rem 0;
}

.newsletter h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 1rem;
}

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

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

.copyright {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Page titles */
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  text-align: center;
}

.page-subtitle {
  color: var(--color-text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Cipher hint section */
.cipher-hint {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(92, 158, 206, 0.1) 100%);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
}

.cipher-hint h3 {
  font-family: var(--font-heading);
  color: var(--color-accent-warm);
  margin-bottom: 0.5rem;
}

.cipher-hint p {
  color: var(--color-text-muted);
}

/* Responsive design */
@media (max-width: 768px) {
  .header-inner {
    padding: 1rem;
  }

  nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 20, 0.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle {
    display: block;
  }

  .social-links {
    display: none;
  }

  main {
    padding: 2rem 1rem;
  }

  .about-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-photo,
  .author-photo-placeholder {
    max-width: 250px;
    margin: 0 auto;
  }

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

  .books-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Utility classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
