/* ============================================
   PREMIUM DESIGN SYSTEM — bellsworth.info
   Dark theme, glassmorphism, modern typography
   ============================================ */

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

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);

  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.15);
  --accent-glow: rgba(34, 211, 238, 0.3);
  --accent-secondary: #818cf8;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --nav-height: 72px;
  --max-width: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #67e8f9; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-bottom: 0.5em; }
h4 { font-size: 1.1rem; margin-bottom: 0.4em; }

p { margin-bottom: 1.2em; color: var(--text-secondary); line-height: 1.8; }

strong, b { color: var(--text-primary); font-weight: 600; }
em, i { font-style: italic; }

/* --- Particle Canvas --- */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
  border: none !important;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  border: none !important;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent) !important;
  background: var(--accent-dim);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
}

/* --- Page Wrapper --- */
.page-wrapper {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-height);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 4rem 2rem;
}

.hero-content {
  text-align: center;
  max-width: 700px;
}

.hero-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  margin: 0 auto 2rem;
}

.hero h1 { margin-bottom: 0.3em; }
.hero h1 .accent { color: var(--accent); }

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  list-style: none;
}
.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass) !important;
  color: var(--text-secondary) !important;
  font-size: 1.2rem;
  transition: all var(--transition);
}
.hero-socials a:hover {
  background: var(--accent-dim);
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

/* --- Section --- */
.section {
  padding: 5rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 0.5rem;
}
.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 2px;
}

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

.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.card:hover::before { opacity: 1; }

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.card-title a {
  color: inherit !important;
  border: none !important;
}
.card-title a:hover { color: var(--accent) !important; }

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.card.muted {
  opacity: 0.5;
  pointer-events: none;
}

/* --- Page Header --- */
.page-header {
  text-align: center;
  padding: 4rem 2rem 2rem;
}
.page-header h1 {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* --- Article Layout --- */
.article-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.article-wrapper h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
}
.article-wrapper .article-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}
.article-wrapper h3 {
  margin-top: 2.5rem;
  color: var(--accent);
}
.article-wrapper h4 {
  margin-top: 2rem;
  color: var(--text-primary);
}
.article-wrapper p {
  margin-bottom: 1.5em;
}
.article-wrapper img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.article-wrapper ul,
.article-wrapper ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}
.article-wrapper li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}
.article-wrapper ol { list-style: decimal; }
.article-wrapper ul { list-style: disc; }

.image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.image-row img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
}
@media (max-width: 600px) {
  .image-row { grid-template-columns: 1fr; }
}

.image-centered {
  display: block;
  margin: 2rem auto;
  max-width: 540px;
  border-radius: var(--radius-md);
}

.image-bordered {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

/* --- Quotes Page --- */
.quotes-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.quote-category {
  margin-bottom: 3rem;
}
.quote-category-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-dim);
}

.quote-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}
.quote-card:hover {
  background: var(--bg-glass-hover);
  border-left-color: var(--accent-secondary);
}

.quote-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.quote-author {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.quote-author a {
  color: var(--accent);
  border: none !important;
}

/* --- Explore Cards (homepage) --- */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.explore-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  transition: all var(--transition);
  text-decoration: none !important;
  color: inherit !important;
  border-bottom: none !important;
}
.explore-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}
.explore-card .card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.explore-card .card-title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.explore-card .card-desc { font-size: 0.9rem; margin-bottom: 0; }

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
  list-style: none;
}
.footer-socials a {
  color: var(--text-muted) !important;
  font-size: 1.1rem;
  border: none !important;
  transition: color var(--transition);
}
.footer-socials a:hover { color: var(--accent) !important; }

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero banner image section --- */
.banner-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 3rem 1.5rem; }
  .section { padding: 3rem 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .article-wrapper { padding: 2rem 1.5rem 4rem; }
  .page-header { padding: 3rem 1.5rem 1.5rem; }
}
