/* ============================================================
   Python for Coding Interviews — Marketing Website
   Theme: Dark Teal Professional
   Palette from book cover:
   - Background:  #060f0e (near-black teal)
   - Surface:     #0d1f1d
   - Surface-2:   #132b28
   - Chartreuse:  #C8E600 (cover title color)
   - Amber:       #E8A020 (cover company names)
   - Text:        #E8EDE8
   - Muted:       #7a9490
   - Border:      #1e3532
   Fonts: Bebas Neue (display), Inter (body), JetBrains Mono (code)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg:         #060f0e;
  --surface:    #0d1f1d;
  --surface-2:  #132b28;
  --border:     #1e3532;
  --chartreuse: #C8E600;
  --amber:      #E8A020;
  --text:       #E8EDE8;
  --muted:      #7a9490;
  --white:      #ffffff;
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--chartreuse); }
img { max-width: 100%; display: block; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,15,14,0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; letter-spacing: 0.04em;
  color: var(--chartreuse); text-decoration: none;
}
.nav-logo span { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.02em; transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--chartreuse); color: #060f0e !important;
  padding: 0.45rem 1.2rem; border-radius: 4px;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em;
  transition: background 0.15s, transform 0.1s;
}
.nav-cta:hover { background: #d4f000 !important; color: #060f0e !important; transform: translateY(-1px); }

/* HERO */
.hero {
  min-height: auto;
  display: flex; align-items: center;
  padding: 5rem 2rem 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(200,230,0,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 20% 80%, rgba(13,31,29,0.8) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 400px;
  gap: 5rem; align-items: center; width: 100%; position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(200,230,0,0.08); border: 1px solid rgba(200,230,0,0.2);
  color: var(--chartreuse); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35rem 0.9rem; border-radius: 2px; margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.95; letter-spacing: 0.02em;
  color: var(--white); margin-bottom: 0.3rem;
}
.hero-title .accent { color: var(--chartreuse); }
.hero-subtitle-text { font-size: 1.05rem; color: var(--muted); margin-bottom: 0.4rem; }
.hero-companies { font-size: 1rem; font-weight: 700; color: var(--amber); margin-bottom: 1.8rem; }
.hero-meta { display: flex; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.hero-meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted); }
.hero-meta-item strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--chartreuse); color: #060f0e;
  font-weight: 700; font-size: 0.95rem;
  padding: 0.8rem 1.8rem; border-radius: 4px; border: none;
  cursor: pointer; transition: background 0.15s var(--ease-out), transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover { background: #d4f000; color: #060f0e; transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--text);
  font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.8rem; border-radius: 4px;
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--muted); color: var(--white); transform: translateY(-2px); }

.hero-book { position: relative; display: flex; justify-content: center; }
.hero-book img {
  width: 300px; border-radius: 4px;
  box-shadow: -8px 8px 0px rgba(200,230,0,0.12), 0 40px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(200,230,0,0.08);
  transform: perspective(800px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.hero-book img:hover {
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg) translateY(-8px);
  box-shadow: -12px 16px 0px rgba(200,230,0,0.18), 0 60px 100px rgba(0,0,0,0.7);
}

/* STATS */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.stats-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 2rem; text-align: center;
}
.stat-number {
  font-family: var(--font-display); font-size: 3rem;
  line-height: 1; color: var(--chartreuse); letter-spacing: 0.02em;
}
.stat-label {
  font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* SECTIONS */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--chartreuse); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0.03em;
  color: var(--white); line-height: 1.05; margin-bottom: 1rem;
}
.section-desc { font-size: 1.05rem; color: var(--muted); max-width: 600px; line-height: 1.7; }

/* FEATURES */
.features-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; margin-top: 3rem;
  background: var(--border); border: 1px solid var(--border);
}
.feature-card { background: var(--surface); padding: 2rem; transition: background 0.2s; }
.feature-card:hover { background: var(--surface-2); }
.feature-icon { font-size: 1.5rem; margin-bottom: 1rem; }
.feature-title { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.feature-tag {
  display: inline-block; margin-top: 0.75rem;
  font-size: 0.72rem; font-family: var(--font-mono);
  color: var(--chartreuse); background: rgba(200,230,0,0.07);
  padding: 0.2rem 0.5rem; border-radius: 2px;
}

/* TOC */
.toc-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 1px; margin-top: 3rem;
  background: var(--border); border: 1px solid var(--border);
}
.toc-item {
  background: var(--surface); padding: 1.25rem 1.5rem;
  display: flex; align-items: flex-start; gap: 1rem;
  transition: background 0.15s;
}
.toc-item:hover { background: var(--surface-2); }
.toc-num {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--chartreuse); opacity: 0.7;
  min-width: 2.5rem; padding-top: 0.15rem;
}
.toc-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.toc-desc { font-size: 0.8rem; color: var(--muted); }

/* CODE TEASER */
.code-section {
  background: var(--surface);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.code-inner {
  max-width: 1100px; margin: 0 auto; padding: 5rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.code-block {
  background: #030808; border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7;
}
.code-header {
  background: #0a1a18; padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28c840; }
.code-filename { font-size: 0.75rem; color: var(--muted); margin-left: 0.5rem; }
.code-body { padding: 1.25rem 1.5rem; overflow-x: auto; }
.code-body pre { margin: 0; }
.kw { color: #C8E600; }
.fn { color: #7dd3fc; }
.st { color: #E8A020; }
.cm { color: #4a6a66; }
.nb { color: #a78bfa; }
.nu { color: #f472b6; }

/* AUTHOR */
.author-section { padding: 5rem 2rem; }
.author-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 260px 1fr;
  gap: 4rem; align-items: start;
}
.author-portrait {
  width: 100%; border-radius: 4px;
  border: 1px solid var(--border);
  filter: grayscale(20%) contrast(1.05);
}
.author-name {
  font-family: var(--font-display); font-size: 2.5rem;
  letter-spacing: 0.04em; color: var(--white); margin-bottom: 0.25rem;
}
.author-title {
  font-size: 0.875rem; color: var(--amber); font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.author-bio p { font-size: 0.975rem; color: var(--muted); line-height: 1.75; margin-bottom: 1rem; }
.author-bio p strong { color: var(--text); }

/* CTA */
.cta-section {
  padding: 6rem 2rem; text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(200,230,0,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { max-width: 600px; margin: 0 auto; position: relative; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: 0.03em;
  color: var(--white); margin-bottom: 1rem; line-height: 1;
}
.cta-title .accent { color: var(--chartreuse); }
.cta-desc { font-size: 1rem; color: var(--muted); margin-bottom: 2.5rem; line-height: 1.7; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* FOOTER */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.04em; color: var(--chartreuse); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { font-size: 0.85rem; color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* PAGE HERO (inner pages) */
.page-hero { padding: 5rem 2rem 3rem; border-bottom: 1px solid var(--border); }
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem); letter-spacing: 0.04em;
  color: var(--white); line-height: 1;
}
.page-hero-title .accent { color: var(--chartreuse); }
.page-hero-sub { font-size: 1rem; color: var(--muted); margin-top: 0.75rem; }

/* FORMS */
.form-section { padding: 4rem 2rem; }
.form-inner { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.75rem 1rem; border-radius: 4px; outline: none;
  transition: border-color 0.15s; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--chartreuse);
  box-shadow: 0 0 0 2px rgba(200,230,0,0.1);
}
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }

/* INTRO BOX */
.intro-box {
  background: rgba(200,230,0,0.05);
  border-left: 3px solid var(--chartreuse);
  padding: 1.25rem 1.5rem; border-radius: 0 4px 4px 0;
  margin-bottom: 2.5rem;
}
.intro-box p { font-size: 0.95rem; color: var(--muted); margin: 0; }
.intro-box p strong { color: var(--text); }

/* DIVIDER */
hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ANIMATIONS */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  }
  .fade-up.visible { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-book { order: -1; }
  .hero-book img { width: 220px; transform: none; }
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .toc-grid { grid-template-columns: 1fr; }
  .code-inner { grid-template-columns: 1fr; }
  .author-inner { grid-template-columns: 1fr; }
  .author-portrait { width: 160px; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .hero-title { font-size: 3rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
