/* ============================================
   beaunelford.org — Modern Static Site Styles
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #555;
  --color-primary: #4f46e5;
  --color-primary-light: #818cf8;
  --color-primary-dark: #3730a3;
  --color-accent: #06b6d4;
  --color-border: #e5e7eb;
  --color-hero-bg: #1a1a2e;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

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

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.92);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--color-primary); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  background: rgba(79, 70, 229, 0.06);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' \25BE'; font-size: 0.7em; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  padding: 0.5rem 0;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 0;
  font-size: 0.85rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Sub-page hero (shorter) */
.hero-sub {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.hero-sub h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-sub .breadcrumb {
  color: rgba(255,255,255,0.6);
  margin-top: 0.75rem;
}
.hero-sub .breadcrumb a {
  color: rgba(255,255,255,0.7);
}
.hero-sub .breadcrumb a:hover {
  color: #fff;
}

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

/* ---- Section Title ---- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* ---- Cards Grid ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(6,182,212,0.1));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}
.card-link::after { content: '\2192'; transition: transform var(--transition); }
.card:hover .card-link::after { transform: translateX(3px); }

/* ---- Tag / Chip Lists ---- */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(79, 70, 229, 0.07);
  color: var(--color-primary-dark);
  border-radius: 20px;
  border: 1px solid rgba(79, 70, 229, 0.15);
  transition: all var(--transition);
}
.tag:hover, .chip:hover {
  background: rgba(79, 70, 229, 0.14);
}

/* Chip alias (same as tag) */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(79, 70, 229, 0.07);
  color: var(--color-primary-dark);
  border-radius: 20px;
  border: 1px solid rgba(79, 70, 229, 0.15);
  transition: all var(--transition);
}

/* ---- Content Blocks ---- */
.content-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.content-block h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.content-block h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

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

.content-block p:last-child { margin-bottom: 0; }

/* ---- Social Links ---- */
.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ---- Learning List ---- */
.learning-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.learning-item:last-child { border-bottom: none; }

.learning-bullet {
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.learning-item strong {
  display: block;
  font-weight: 600;
}

.learning-item span {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---- Intro Text ---- */
.intro-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.footer a { color: var(--color-primary); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* ---- Math / Formula Block ---- */
.formula-block {
  background: #f1f5f9;
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
