/* style.css
   Main stylesheet for the author one-page site.
   Use this file to change spacing, colors, fonts, and layout.
*/

/* ===== Base / Reset-ish ===== */
:root{
  --bg: #ffffff;
  --text: #121212;
  --muted: #666666;
  --accent: #1e88e5;
  --max-width: 1100px;
  --container-padding: 1.25rem;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(16,24,40,0.08);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  font-size:16px;
}

/* Container */
.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem var(--container-padding);
}

/* ===== Header ===== */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,0.95);
  border-bottom:1px solid #efefef;
  backdrop-filter: blur(6px);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:0.75rem 0;
}
.brand a {
  font-weight:700;
  color:var(--text);
  text-decoration:none;
  font-size:1.15rem;
}
.main-nav{display:flex;align-items:center}
.nav-links{
  display:flex;
  gap:0.5rem;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-links a{
  display:inline-block;
  padding:0.35rem 0.6rem;
  color:var(--text);
  text-decoration:none;
  border-radius:8px;
  font-weight:500;
}
.nav-links a:hover, .nav-links a:focus{
  background:rgba(30,136,229,0.08);
  outline:none;
}

/* Mobile nav toggle */
.nav-toggle{
  display:none;
  background:transparent;
  border:none;
  font-size:1.2rem;
}

/* ===== Sections ===== */
.section{padding:3rem 0}
.hero-inner{
  display:grid;
  grid-template-columns: 1fr 380px;
  gap:2rem;
  align-items:center;
}
.hero-copy h1{margin:0 0 0.5rem 0; font-size:1.9rem}
.hero-copy p{color:var(--muted); margin:0 0 1rem 0}

/* Carousel */
.carousel-wrapper{display:flex;flex-direction:column;align-items:center}
.carousel{
  position:relative;
  width:100%;
  max-width:600px;
  margin:0 auto;
  overflow:hidden;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  background:#fff;
}
.carousel-track{
  display:flex;
  transition:transform 420ms cubic-bezier(.2,.9,.2,1);
  will-change:transform;
}
.carousel-item{
  min-width:100%;
  box-sizing:border-box;
  text-align:center;
  padding:0.5rem;
}
.carousel-item img{display:block;margin:0 auto;max-width:100%;height:auto;border-radius:6px}
.carousel-caption{margin-top:0.5rem;font-weight:600;color:var(--muted)}

/* Buttons */
.carousel-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:none;
  background:rgba(0,0,0,0.55);
  color:#fff;
  padding:0.45rem 0.65rem;
  border-radius:999px;
  cursor:pointer;
  font-size:1.05rem;
  z-index:4;
}
.carousel-btn.prev{left:12px}
.carousel-btn.next{right:12px}
.carousel-btn:focus{outline:2px solid rgba(255,255,255,0.9);}

/* Dots */
.carousel-dots{display:flex;gap:6px; margin-top:10px; justify-content:center}
.carousel-dots button{
  width:10px;height:10px;border-radius:50%;border:none;background:#ddd;cursor:pointer;
}
.carousel-dots button.active{background:var(--accent)}

/* Book grid */
.book-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap:1.25rem;
  margin-top:1rem;
}
.book-card{background:#fff;padding:1rem;border-radius:12px;box-shadow:var(--shadow);text-align:center}
.book-card img{max-width:100%;height:auto;border-radius:8px}
.book-card h3{margin:0.5rem 0}
.book-desc{color:var(--muted)}

/* Author bio */
.bio-grid{display:grid;grid-template-columns: 1fr 1fr;gap:1.25rem;align-items:center}
.bio-photo img{width:100%;height:auto;border-radius:12px;box-shadow:var(--shadow)}

/* Sign up form */
.signup-form{
  max-width:520px;
  display:flex;
  flex-direction:column;
  gap:0.5rem;
}
.signup-form label{font-weight:600}
.signup-form input{
  padding:0.6rem 0.75rem;border:1px solid #e6e6e6;border-radius:8px;font-size:1rem;
}
.form-actions{display:flex;gap:1rem;align-items:center;margin-top:0.5rem}
.form-message{color:var(--muted); font-size:0.95rem}

/* Contact list */
.contact-list{list-style:none;padding:0;margin:0}
.contact-list li{margin:0.35rem 0}

/* Footer */
.site-footer{border-top:1px solid #efefef;padding:1.25rem 0;background:#fff}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.colophon img{display:block}

/* Buttons common */
.button{
  display:inline-block;
  background:var(--accent);
  color:#fff;
  padding:0.6rem 0.9rem;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
}
.button.small{padding:0.4rem 0.6rem;font-size:0.95rem}

/* ===== Responsive adjustments ===== */
@media (max-width:980px){
  .hero-inner{grid-template-columns: 1fr; text-align:center}
  .bio-grid{grid-template-columns: 1fr}
  .header-inner{padding:0.5rem 0}
  .nav-links{display:none; position:absolute; top:64px; right:1rem; background:#fff; border-radius:8px; box-shadow:var(--shadow); flex-direction:column; padding:0.5rem}
  .nav-links.show{display:flex}
  .nav-toggle{display:inline-block}
}

@media (max-width:560px){
  :root{font-size:15px}
  .carousel-btn{padding:0.35rem 0.5rem}
}

/* --- Fixed header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;        /* span full width */
  z-index: 1000;      /* stay above all other content */
  background: #fff;   /* solid background so content doesn’t show through */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

/* Optional shadow effect when scrolling */
.site-header.sticky {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Prevent content from hiding behind the fixed header */
main {
  padding-top: 80px; /* adjust to your header height */
}
