/* ====== COLOR THEME ====== */
:root {
  --bg-main: #fdf8f1;
  --bg-alt: #f6eaaf;
  --bg-card: #ffffff;
  --accent-soft: #ead3c1;
  --accent-strong: #941236;
  --accent-strong-soft: #b51a44;
  --text-main: #222222;
  --text-muted: #5a5a5a;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
}

/* ====== GLOBAL ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: radial-gradient(
    circle at top right,
    #f6eaaf 0,
    #fdf8f1 45%,
    #ffffff 100%
  );
  color: var(--text-main);
}

body {
  line-height: 1.6;
}

/* ====== NAVBAR ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to right,
    rgba(253, 248, 241, 0.92),
    rgba(250, 243, 227, 0.96)
  );
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #f6eaaf, var(--accent-strong));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  align-items: center;
}

/* Unified style for nav links AND dropdown button */
.nav-links a,
.nav-links .dropbtn {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

/* Hover style shared by links and dropdown button */
.nav-links a:hover,
.nav-links .dropbtn:hover {
  background: rgba(148, 18, 54, 0.08);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

/* ====== DROPDOWN ====== */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Make sure button text aligns nicely like links */
.dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Dropdown Content */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 180px;
  box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.15);
  z-index: 10;
  border-radius: 8px;
  padding: 0.4rem 0;
}

/* Links inside dropdown */
.dropdown-content a {
  display: block;
  padding: 0.65rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-main);
  border-radius: 0;
}

.dropdown-content a:hover {
  background-color: #f5f5f5;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* ====== HERO ====== */
.hero {
  padding: 4.5rem 1.5rem 3.5rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-text h1 {
  font-size: clamp(2.15rem, 3vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero-subtitle {
  font-size: 0.99rem;
  max-width: 34rem;
  color: var(--text-muted);
}

.hero-subtitle strong {
  color: var(--accent-strong-soft);
}

.hero-actions {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-strong-soft));
  color: #fff;
  box-shadow: 0 14px 30px rgba(148, 18, 54, 0.35);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(148, 18, 54, 0.45);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(148, 18, 54, 0.2);
  color: var(--accent-strong);
}

.btn.ghost:hover {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Right panel in hero */
.hero-panel {
  background: radial-gradient(circle at top left, #ffffff 0, #f6eaaf 55%, #ead3c1 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 18, 54, 0.06);
}

.hero-panel h2 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.hero-panel p {
  font-size: 0.9rem;
  color: #3f3f3f;
}

.hero-tags {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags li {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(148, 18, 54, 0.06);
  color: var(--accent-strong);
}

/* ====== QUICK SECTIONS ====== */
.quick-sections {
  padding: 0 1.5rem 3.5rem;
}

.quick-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.quick-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.04);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.quick-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.quick-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.09);
  border-color: rgba(148, 18, 54, 0.18);
}

.quick-link {
  display: inline-flex;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.quick-link:hover {
  text-decoration: underline;
}

/* ====== FOOTER ====== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem 1.4rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .quick-container {
    grid-template-columns: minmax(0, 1fr);
  }

  /* For now, hide nav links on mobile (can add a burger menu later) */
  .nav-links {
    display: none;
  }
}
/* ===== Logo Strip ===== */
.logo-strip {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.logo-strip img {
  height: 42px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(20%);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

.logo-strip img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-2px);
}

.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

.mm-col h2 {
  margin-top: 0;
}

.mm-col p, .mm-col li {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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


/* General sections */
.page-section {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.blogs-hero {
  text-align: center;
  max-width: 900px;
  margin: 2.5rem auto 2rem;
  padding: 0 1.5rem;
}

.blogs-hero h1 {
  margin: 0;
}

.hero-subtle {
  font-size: 0.9rem;
  color: #555;
}

/* Controls */
.blogs-controls-inner,
.blogs-series-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

.blogs-search,
.blogs-themes {
  flex: 1 1 260px;
}

.field-label {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  display: block;
}

.field-hint {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

.input,
.select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

/* Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  border: 1px solid #ccc;
  background: #f9f9f9;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip-primary.active,
.chip-secondary.active {
  background: #222;
  color: #fff;
  border-color: #222;
}

/* Layout */
.blogs-layout-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
}

.blogs-main {
  flex: 3 1 520px;
}

.blogs-sidebar {
  flex: 1 1 260px;
}

/* Main header */
.blogs-main-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.blogs-main-header h2 {
  margin: 0;
}

/* Blog cards */
.blogs-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  border-radius: 0.75rem;
  border: 1px solid #e2e2e2;
  padding: 0.9rem 1rem;
  background: #fff;
}

.blog-title {
  margin: 0;
  font-size: 1rem;
}

.blog-link {
  text-decoration: none;
}

.blog-meta {
  margin: 0.25rem 0 0.2rem;
  font-size: 0.82rem;
  color: #777;
}

.blog-series-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: #666;
}

.blog-summary {
  margin: 0;
  font-size: 0.93rem;
  color: #444;
}

.blog-tag {
  font-style: italic;
}

/* Sidebar */
.sidebar-section + .sidebar-section {
  margin-top: 1.8rem;
}

.sidebar-section h2 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

.sidebar-list li a {
  text-decoration: none;
}

.sidebar-text {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.viz-wrapper {
  margin: 3rem 0;
}

.viz-frame {
  position: relative;
  padding: 2.5rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7da, #fdeedc);
  border: 2px dashed #e2a7a7;
}

.viz-badge {
  position: absolute;
  bottom: 16px;
  right: 18px;
  background: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #941236;
}

.viz-caption {
  margin-top: 0.9rem;
  text-align: center;
  color: #555;
  font-size: 0.9rem;
}

/* Image → vector */
.viz-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pixel-grid {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: #222;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  text-align: center;
}

.viz-arrow {
  font-size: 2rem;
  margin: 0 2rem;
  color: #941236;
}

.vector-bar {
  background: #fff;
  padding: 1rem 1.4rem;
  border-radius: 12px;
  font-family: monospace;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

/* Cosine space */
.vector-space {
  position: relative;
  width: 320px;
  height: 220px;
}

.origin {
  position: absolute;
  bottom: 20px;
  left: 40px;
  font-size: 1.2rem;
}

.vector {
  position: absolute;
  bottom: 20px;
  left: 40px;
  width: 180px;
  height: 3px;
  background: #941236;
  transform-origin: left;
}

.vector.v2 {
  transform: rotate(-10deg);
  background: #b13b4c;
}

.vector.v3 {
  transform: rotate(-50deg);
}

.vector.faded {
  opacity: 0.35;
}

.vector span {
  position: absolute;
  right: -6px;
  top: -18px;
  font-size: 0.75rem;
}

.angle-label {
  position: absolute;
  top: 20px;
  right: 10px;
  font-size: 0.75rem;
  color: #555;
}
