/**
 * NEILSINGH.CO - GLOBAL DESIGN SYSTEM
 * ------------------------------------------------------------
 * A modern, editorial dark system focusing on premium aesthetics,
 * glassmorphism, and high-readability typography.
 */

:root {
  /* Colors - Core */
  --bg-color: #0a0a08;
  --surface-color: #111110;
  --surface-color-light: #1a1a16;
  --border-color: #222220;
  
  /* Primary & Accents */
  --primary-color: #c8392b; /* Deep Red */
  --primary-hover: #a82e23;
  --accent-color: #e8a020;  /* Golden Amber */
  --accent2: #e8a020;       /* Alias for accent-color used in blogs */
  --accent-muted: rgba(232, 160, 32, 0.2);
  
  /* Typography Colors */
  --text-main: #e8e6de;
  --text-muted: #7a7870;
  --text-inverse: #0a0a08;
  
  /* Glassmorphism */
  --glass-bg: rgba(17, 17, 16, 0.8);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  
  /* Spacing */
  --section-padding: 80px;
  --container-max: 1200px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------------------
   1. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Noise texture overlay - subtly applied */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.4; /* Increased from 1.25 to prevent scramble */
}

ul {
  list-style: none;
}

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

/* ------------------------------------------------------------
   2. REUSABLE UTILITIES
   ------------------------------------------------------------ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: var(--section-padding) 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.label-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
}

/* ------------------------------------------------------------
   3. NAVIGATION (GLASSMORPHIC)
   ------------------------------------------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition-smooth);
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  box-shadow: var(--glass-shadow);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--primary-color);
  margin-top: 4px;
}

/* ------------------------------------------------------------
   4. BUTTONS & UI ELEMENTS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  gap: 10px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(200, 57, 43, 0.4);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(200, 57, 43, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Icons styling */
.btn i {
  font-size: 1.1rem;
}

/* ------------------------------------------------------------
   5. FOOTER
   ------------------------------------------------------------ */
footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
  background: var(--bg-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-info .logo {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.footer-info p {
  color: var(--text-muted);
  max-width: 400px;
  font-size: 0.95rem;
}

.footer-col h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  font-size: 1.2rem;
  opacity: 0.6;
}

.social-links a:hover {
  opacity: 1;
  color: var(--primary-color);
}

/* ------------------------------------------------------------
   6. ANIMATIONS
   ------------------------------------------------------------ */
[data-aos] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   7. MOBILE RESPONSIVENESS
   ------------------------------------------------------------ */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Add toggle logic if needed */
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .container {
    padding: 0 24px;
  }
}

/* ------------------------------------------------------------
   8. BLOG POST SPECIFIC STYLES (BACKWARD COMPATIBILITY)
   ------------------------------------------------------------ */

/* Article Body overrides for blog posts */
article {
  max-width: 740px;
  margin: 0 auto;
  padding: 4rem 3rem;
  animation: fadeUp 1s ease 0.4s both;
}

article p {
  margin-bottom: 1.6rem;
}

/* Drop Cap */
.drop-cap::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 4.5em;
  font-weight: 900;
  float: left;
  line-height: 0.75;
  margin: 0.1em 0.12em 0 0;
  color: var(--primary-color);
}

/* Section Headings inside articles */
article h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.95rem;
  font-weight: 700;
  margin: 3.5rem 0 1.8rem;
  line-height: 1.45; /* Increased from 1.2 to prevent scramble */
  position: relative;
  padding-left: 1.5rem;
  letter-spacing: -0.01em;
}

article h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  background: var(--primary-color);
}

article h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin: 3rem 0 1rem;
}

/* Pull Quotes */
blockquote {
  border: none;
  margin: 3.5rem -2rem;
  padding: 2.5rem 3rem;
  background: var(--surface-color-light);
  border-left: 4px solid var(--primary-color);
  position: relative;
}

blockquote::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  color: var(--primary-color);
  opacity: 0.2;
  position: absolute;
  top: -1rem;
  left: 1.5rem;
  line-height: 1;
}

blockquote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  margin: 0;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-style: normal;
  text-transform: uppercase;
}

/* Evidence Cards */
.evidence-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-color);
  padding: 1.8rem 2rem;
  margin: 2.5rem 0;
  position: relative;
}

.evidence-card .card-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

.evidence-card .stat {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  display: block;
  margin-top: 0.5rem;
}

/* Data Grid */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}

.data-cell {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}

.data-cell .value {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-color);
}

/* Tautology Box */
.tautology-box {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
}

.loop-item {
  background: var(--surface-color-light);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.loop-arrow {
  color: var(--primary-color);
  font-size: 1.2rem;
  padding: 0 0.25rem;
}

/* Closing Section */
.closing-section {
  margin-top: 5rem;
  padding: 3rem;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  position: relative;
  overflow: hidden;
}

.closing-section::after {
  content: var(--closing-watermark, '');
  position: absolute;
  right: -1rem;
  bottom: -2rem;
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  font-weight: 900;
  color: var(--primary-color);
  opacity: 0.05;
  user-select: none;
  pointer-events: none;
}

/* References */
.references {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.references ol { padding-left: 1.5rem; }
.references li {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
}

/* ------------------------------------------------------------
   9. PAGE SPECIFIC LAYOUTS
   ------------------------------------------------------------ */

/* Blog Post Hero Layout */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 160px 20px 80px;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.25;
  margin-bottom: 2rem;
  font-weight: 900;
  color: var(--text-main);
}

.hero .deck {
  font-family: 'Newsreader', serif;
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 3rem;
  font-style: italic;
}

.hero .category-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.hero .byline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.hero-col-left {
  flex: 1;
  min-width: 320px;
}

.hero-col-right {
  flex: 0.8;
  min-width: 320px;
}

/* Video Grid Layouts */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.video-slot {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-color);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.video-slot iframe,
.video-slot video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

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

.hero-stats {
  margin-top: 4rem;
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.hero-img-box {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--border-color);
}

.hero-img-box img {
  width: 100%;
}

.hero-img-box .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px;
}

/* Expertise Grid */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.expertise-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.expertise-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
}

.expertise-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-muted);
  color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

/* Bio Section Layout */
.bio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 60px;
}

.bio-col {
  flex: 1;
  min-width: 320px;
}

.bio-img-frame {
  position: relative;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 4px;
}
