/* ============================================
   Dr. Zahir Hasan — Author Website
   Modern, magical, clean design
   ============================================ */

:root {
  --bg: #faf8f5;
  --bg-alt: #f3efe8;
  --surface: #ffffff;
  --text: #2c2a26;
  --text-muted: #6b6560;
  --accent: #3d6b4f;
  --accent-soft: #e8f0eb;
  --accent-hover: #2f543d;
  --gold: #c9a227;
  --gold-soft: #f7f0d9;
  --border: #e8e2d9;
  --shadow: 0 4px 24px rgba(44, 42, 38, 0.06);
  --shadow-hover: 0 12px 40px rgba(44, 42, 38, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --max-width: 1120px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; }

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

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 38rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.25s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: 0.3s ease;
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li {
    border-bottom: 1px solid var(--border);
  }
  .nav-links a {
    display: block;
    padding: 1rem 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 550;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(61, 107, 79, 0.25);
}

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

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

.btn-ghost {
  background: var(--gold-soft);
  color: #8a6d12;
}

.btn-ghost:hover {
  background: #f0e6c0;
}

.hero {
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(61, 107, 79, 0.07), transparent),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(201, 162, 39, 0.06), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .lead {
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.book-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.book-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #e8f0eb 0%, #d4e5d9 50%, #c5d8c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.book-cover.whisper {
  background: linear-gradient(145deg, #e8eef5 0%, #d4e0ef 50%, #c5d4e8 100%);
}

.book-cover.elk {
  background: linear-gradient(145deg, #f0ebe0 0%, #e5d9c5 50%, #d9cbb0 100%);
}

.book-cover-inner {
  text-align: center;
  padding: 1.5rem;
  z-index: 1;
}

.book-cover-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.book-cover-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.book-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.book-body h3 {
  margin-bottom: 0.6rem;
}

.book-body p {
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1.25rem;
}

.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #8a6d12;
}

.status-pill.available {
  background: var(--accent-soft);
  color: var(--accent);
}

.series-hero {
  padding: 4rem 0 3rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.series-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .series-grid {
    grid-template-columns: 1fr;
  }
}

.series-cover-large {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #e8eef5 0%, #d4e0ef 50%, #c5d4e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  max-width: 340px;
}

.series-cover-large.elk {
  background: linear-gradient(145deg, #f0ebe0 0%, #e5d9c5 50%, #d9cbb0 100%);
}

.character-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.character {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.character-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.character h4 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.character p {
  font-size: 0.9rem;
  margin: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-photo {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--accent-soft), #d4e5d9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--accent);
  max-width: 320px;
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2.5rem;
  max-width: 560px;
  box-shadow: var(--shadow);
}

.contact-methods {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.contact-item svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.site-footer {
  margin-top: auto;
  background: var(--text);
  color: #c9c4bc;
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand span {
  color: #8fbc9a;
}

.footer-links h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: #a8a29a;
  font-size: 0.9rem;
  display: block;
  padding: 0.3rem 0;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #3a3732;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #8a857c;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.section-header {
  max-width: 560px;
  margin-bottom: 1rem;
}

.section-header p {
  margin-top: 0.5rem;
}

.coming-soon {
  opacity: 0.75;
}

.coming-soon .book-cover {
  background: linear-gradient(145deg, #ebe8e4, #ddd9d3);
}

.ornament {
  display: inline-block;
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 1rem;
}
