/* ── adventuressmalik.com Editorial Design System (Textured Sky Blue & Dark Blue Science Theme) ── */
:root {
  --midnight: #0A2540;
  --dark-blue: #0B3D6B;
  --sky: #87CEFA;
  --light-sky: #E2F2FC;
  --charcoal: #132232;

  --bg: #E2F2FC;
  --bg-soft: #D1E9F8;
  --surface: #F7FBFE;
  --surface2: #ECF6FD;
  --line: rgba(11, 61, 107, 0.15);
  --text: #0D2238;
  --text-muted: #2B4865;
  --text-dim: #4A6A88;
  --accent: #0B3D6B;
  --accent-bright: #14548C;
  --accent-ink: #082D50;
  --on-accent: #FFFFFF;

  --display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --reading: 'Literata', 'Noto Serif', Georgia, serif;
  --deva-head: 'Noto Serif Devanagari', Georgia, serif;
  --deva-body: 'Noto Sans Devanagari', system-ui, sans-serif;

  --shadow-1: 0 2px 16px rgba(10, 37, 64, 0.08);
  --shadow-2: 0 12px 36px rgba(10, 37, 64, 0.14);
  --radius: 10px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  --bg-texture: var(--grain);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071B30;
    --bg-soft: #0C2642;
    --surface: #103052;
    --surface2: #163C63;
    --line: rgba(135, 206, 250, 0.22);
    --text: #FFFFFF;
    --text-muted: #B8E2FF;
    --text-dim: #87CEFA;
    --accent: #87CEFA;
    --accent-bright: #B5E2FF;
    --accent-ink: #87CEFA;
    --on-accent: #071B30;
    --shadow-1: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 22px 54px rgba(0, 0, 0, 0.52);
    --bg-texture: var(--grain);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #071B30;
  --bg-soft: #0C2642;
  --surface: #103052;
  --surface2: #163C63;
  --line: rgba(135, 206, 250, 0.22);
  --text: #FFFFFF;
  --text-muted: #B8E2FF;
  --text-dim: #87CEFA;
  --accent: #87CEFA;
  --accent-bright: #B5E2FF;
  --accent-ink: #87CEFA;
  --on-accent: #071B30;
  --shadow-1: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 22px 54px rgba(0, 0, 0, 0.52);
  --bg-texture: var(--grain);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--bg);
  background-image:
    var(--bg-texture),
    linear-gradient(155deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%);
  background-repeat: repeat, no-repeat;
  background-attachment: fixed, fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 0.65rem 1rem; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; border-radius: 6px; }

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.22;
  margin: 0;
  color: var(--text);
}
.deva, [lang="hi"] { font-family: var(--deva-body); }
h1.deva, h2.deva, h3.deva, .deva-head { font-family: var(--deva-head); }

.wrap { width: min(100% - 2.2rem, 52rem); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.2rem, 72rem); margin-inline: auto; }
section { padding-block: clamp(2.5rem, 4.5vw, 4rem); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Topbar & Navigation ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.brand img { width: 2.3rem; height: 2.3rem; border-radius: 7px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 0.96rem; line-height: 1.1; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

.topnav { display: flex; align-items: center; gap: 0.75rem; }
.navlinks { display: flex; align-items: center; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.navlinks > li { position: relative; }
.navlinks a, .nav-drop-btn {
  color: var(--text-muted); text-decoration: none; font-size: 0.92rem; font-weight: 600;
  background: none; border: 0; padding: 0.35rem 0; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap;
}
.navlinks a:hover, .navlinks a[aria-current="page"], .nav-drop-btn:hover { color: var(--accent); }

.nav-dropdown {
  position: absolute; top: 100%; left: 0; min-width: 12.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 0.4rem; display: none; z-index: 50;
}
.navlinks li:hover > .nav-dropdown,
.navlinks li:focus-within > .nav-dropdown,
.navlinks li[data-open] > .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.88rem;
}
.nav-dropdown a:hover { background: var(--bg-soft); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.15rem; height: 2.15rem; padding: 0; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-muted);
  cursor: pointer; text-decoration: none; flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }
.navtoggle { display: none; }

@media (max-width: 58rem) {
  .navtoggle { display: inline-flex; }
  .navlinks {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.2rem 1rem; box-shadow: var(--shadow-2);
  }
  .navlinks[data-open] { display: flex; }
  .navlinks > li { border-bottom: 1px solid var(--line); }
  .navlinks > li:last-child { border-bottom: 0; }
  .navlinks a, .nav-drop-btn { padding: 0.7rem 0.2rem; width: 100%; justify-content: space-between; }
  .nav-dropdown { position: static; box-shadow: none; border: 0; background: var(--bg-soft); margin-bottom: 0.4rem; }
}

/* ── Compact Seamless Half-Bleed Editorial Hero ── */
.hero-editorial {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2rem, 3.8vw, 3.2rem);
  min-height: 380px;
  display: flex;
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-editorial { min-height: 400px; max-height: 440px; }
}
.hero-bg-rotator {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 56%;
  z-index: 0;
  display: grid;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.45) 18%, #000 38%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.45) 18%, #000 38%, #000 100%);
}
.hero-slide {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.8s ease-in-out;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center 45%;
}
.hero-scrim {
  display: none;
}
@media (max-width: 52rem) {
  .hero-editorial { min-height: 0; max-height: none; padding-top: 2rem; padding-bottom: 2.5rem; }
  .hero-bg-rotator {
    width: 100%;
    opacity: 0.28;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, #000 50%, rgba(0,0,0,0.5) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, #000 50%, rgba(0,0,0,0.5) 100%);
  }
}

.hero-foreground {
  position: relative;
  z-index: 2;
}
.hero-copy {
  max-width: 34rem;
}
.hero-eyebrow {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.45rem;
}
.hero-editorial h1 {
  font-size: clamp(1.65rem, 1.25rem + 1.5vw, 2.35rem);
  letter-spacing: -0.015em; margin-bottom: 0.5rem;
}
.hero-author {
  font-family: var(--display); font-size: 1.08rem; font-weight: 700; color: var(--accent-ink);
  margin: 0 0 0.2rem;
}
.hero-roles {
  font-size: 0.88rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}
.hero-lede {
  color: var(--text-muted); font-size: 1.02rem; max-width: 34rem; margin: 0 0 1.25rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.65rem 1.25rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-bright); color: var(--on-accent); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.btn-sm { padding: 0.42rem 0.9rem; font-size: 0.82rem; }

.hero-pause {
  position: absolute; right: 1.25rem; bottom: 0.85rem; z-index: 3;
  background: rgba(7, 27, 48, 0.62); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(6px);
  border-radius: 999px; font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.7rem; cursor: pointer;
}
.hero-pause:hover { background: rgba(7, 27, 48, 0.85); }

/* ── Stats Strip ── */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
@media (max-width: 38rem) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-cell { background: var(--surface); padding: 1.05rem 0.8rem; text-align: center; text-decoration: none; color: inherit; }
.stat-cell:hover .stat-num { color: var(--accent-ink); }
.stat-num { font-family: var(--display); font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem); font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-lab { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; margin-top: 0.25rem; }

/* ── Section Headers & Breadcrumbs ── */
.eyebrow {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.4rem;
}
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.sec-title { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.95rem); }
.sec-lede { color: var(--text-muted); max-width: 44rem; margin: 0.45rem 0 0; }
.sec-alt { background: var(--bg-soft); }

.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text-dim); margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.page-header { padding-block: clamp(1.75rem, 3.5vw, 2.75rem); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.page-header h1 { font-size: clamp(1.65rem, 1.3rem + 1.4vw, 2.3rem); margin-bottom: 0.5rem; }

/* ── Grids & Cards ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }
@media (max-width: 56rem) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 38rem) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.card h3 { font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.badge {
  display: inline-block; padding: 0.18rem 0.55rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--bg-soft); color: var(--accent-ink); border: 1px solid var(--line);
  width: fit-content;
}
.badge-gold { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); border-color: var(--accent); }

/* ── Book Cards ── */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1.35rem; }
.book-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem; display: flex; flex-direction: column; gap: 0.55rem;
  box-shadow: var(--shadow-1); transition: transform 0.18s ease, border-color 0.18s ease;
}
.book-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.book-cover {
  aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover.no-art {
  display: flex; align-items: center; justify-content: center; padding: 1rem; text-align: center;
  background: linear-gradient(155deg, var(--midnight), #1E4463); color: #F6F2E9;
  font-family: var(--display); font-style: italic; font-size: 0.95rem;
}
.book-title { font-family: var(--display); font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.book-meta { font-size: 0.76rem; color: var(--text-dim); }
.book-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; flex: 1; }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }

/* ── Ventures ── */
.ventures-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
@media (max-width: 44rem) { .ventures-grid { grid-template-columns: 1fr; } }
.venture-card {
  position: relative; min-height: 11.5rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); padding: 1.35rem; text-decoration: none;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem;
  background-size: cover; background-position: center; box-shadow: var(--shadow-1);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.venture-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14, 28, 42, 0.92) 0%, rgba(14, 28, 42, 0.55) 55%, rgba(14, 28, 42, 0.35) 100%);
}
.venture-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.venture-card > * { position: relative; z-index: 1; }
.venture-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-bright); }
.venture-name { font-family: var(--display); font-size: 1.12rem; font-weight: 700; color: #FFFFFF; }
.venture-desc { font-size: 0.86rem; color: rgba(246, 242, 233, 0.88); }

/* ── Filters & Search Bars ── */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin-bottom: 1.5rem; padding: 1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.input, .select {
  padding: 0.55rem 0.85rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem;
}
.input { flex: 1; min-width: 14rem; }

/* ── Quote Band & Footer ── */
.quote-band {
  padding: 1.75rem 1.5rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); margin-block: 1.5rem;
}
.quote-band p { font-family: var(--display); font-style: italic; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); margin: 0; }

.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding-block: 2.5rem; font-size: 0.88rem; color: var(--text-muted);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 46rem) { .footer-grid { grid-template-columns: 1fr; } }
.footer-links { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.35rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem; color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
