/*
Theme Name: Dilli Bhattarai Authority
Theme URI: https://dillibhattarai.com
Author: Custom Build
Author URI: https://dillibhattarai.com
Description: Premium personal authority theme for Dilli P. Bhattarai. Apple-style minimalism, Gutenberg-native, performance-first.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dilli-authority

This theme is built for long-term authority positioning, SEO excellence, and timeless design.
*/

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #000000;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: #000000;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #1d1d1f;
}

a {
  color: #000000;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */

.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

/* ============================================
   HEADER NAVIGATION
   ============================================ */

.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.01em;
}

.main-navigation {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.main-navigation a {
  font-size: 1rem;
  font-weight: 500;
  color: #1d1d1f;
  position: relative;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #000000;
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.current::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .main-navigation.active {
    display: flex;
  }

  .main-navigation a {
    padding: 1rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
}

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero-section {
  padding: 6rem 0;
  text-align: center;
}

.hero-section h1 {
  margin-bottom: 1rem;
}

.hero-section .subtitle {
  font-size: 1.5rem;
  color: #6e6e73;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

@media (max-width: 600px) {
  .hero-section {
    padding: 4rem 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #000000;
}

.btn-primary {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
}

.btn-primary:hover {
  background-color: #1d1d1f;
  opacity: 1;
}

.btn-secondary {
  background-color: transparent;
  color: #000000;
  border-color: #000000;
}

.btn-secondary:hover {
  background-color: #000000;
  color: #ffffff;
  opacity: 1;
}

.btn-text {
  background: none;
  border: none;
  color: #000000;
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.btn-text::after {
  content: ' →';
  margin-left: 0.5rem;
  transition: margin-left 0.2s ease;
}

.btn-text:hover::after {
  margin-left: 1rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.three-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  padding: 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: #000000;
  transform: translateY(-4px);
}

.card h3 {
  margin-bottom: 1rem;
}

.card p {
  color: #6e6e73;
  margin-bottom: 1.5rem;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 6rem 0;
}

.section-dark {
  background-color: #000000;
  color: #ffffff;
}

.section-dark h2,
.section-dark h3,
.section-dark p {
  color: #ffffff;
}

.section-gray {
  background-color: #f5f5f7;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.25rem;
  color: #6e6e73;
}

/* ============================================
   BLOG STYLES
   ============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
  margin: 3rem 0;
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card-image {
  width: 100%;
  height: 250px;
  background-color: #f5f5f7;
  margin-bottom: 1.5rem;
}

.blog-card-meta {
  font-size: 0.875rem;
  color: #6e6e73;
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.blog-card p {
  color: #6e6e73;
  flex: 1;
}

/* Single Blog Post */
.single-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.post-header {
  margin-bottom: 3rem;
}

.post-meta {
  font-size: 0.875rem;
  color: #6e6e73;
  margin-bottom: 2rem;
}

.post-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.post-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
  margin-left: 2rem;
  margin-bottom: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.post-content blockquote {
  border-left: 4px solid #000000;
  padding-left: 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6e6e73;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background-color: #000000;
  color: #ffffff;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-column h4 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column a {
  color: #a1a1a6;
  font-size: 0.9375rem;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #a1a1a6;
  font-size: 0.875rem;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #000000;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }
.py-3 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .three-col-grid,
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   WORDPRESS BLOCK EDITOR SUPPORT
   ============================================ */

.wp-block-group {
  margin-bottom: 2rem;
}

.wp-block-separator {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 3rem 0;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

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

.lazyload {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazyloaded {
  opacity: 1;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .site-header,
  .site-footer,
  .btn,
  .hero-cta {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000000;
  }
}
