/* ===================================
   AJAY RAJBANSHI - PORTFOLIO STYLES
   ===================================
   1. CSS Custom Properties
   2. Base / Reset
   3. Typography
   4. Skip Link
   5. Navigation
   6. Hero Section
   7. Section Common
   8. About Section
   9. Services Section
   10. Portfolio Section
   11. Blog Section
   12. Contact Section
   13. Footer
   14. Back to Top
   15. Dark Mode Overrides
   16. Page Header (inner pages)
   17. Service Detail Page
   18. Blog Post Page
   19. Blog Sidebar
   20. Single Portfolio Page
   21. Archive Description
   22. Animations
   23. Reduced Motion
   =================================== */

/* ===================================
   1. CSS Custom Properties
   =================================== */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-primary-rgb: 37, 99, 235;
  --color-secondary: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-border: #e2e8f0;
  --color-card-bg: #ffffff;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-shadow-lg: rgba(0, 0, 0, 0.12);
  --color-overlay: rgba(15, 23, 42, 0.85);

  --font-heading: 'DM Serif Display', serif;
  --font-body: 'Inter', sans-serif;

  --section-padding: 100px 0;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--color-primary-dark);
}

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

::selection {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* ===================================
   3. Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
}

/* ===================================
   4. Skip Link
   =================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
  color: #ffffff;
}

/* ===================================
   5. Navigation
   =================================== */
.navbar {
  padding: 16px 0;
  transition: all var(--transition);
  background-color: transparent;
}

.navbar.scrolled {
  background-color: var(--color-bg);
  box-shadow: 0 2px 20px var(--color-shadow);
  padding: 10px 0;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text) !important;
  font-weight: 400;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: height var(--transition);
}

.navbar.scrolled .custom-logo {
  height: 34px;
}

@media (max-width: 575.98px) {
  .custom-logo {
    height: 32px;
    max-width: 140px;
  }

  .navbar.scrolled .custom-logo {
    height: 28px;
  }
}

.navbar-nav .nav-link {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px !important;
  transition: color var(--transition);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--color-primary);
}

.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  padding: 0;
}

.theme-toggle:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.navbar-toggler {
  border: 1px solid var(--color-border);
  padding: 6px 10px;
  font-size: 1.1rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.25);
}

/* Mobile nav collapse */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 12px;
    box-shadow: 0 8px 30px var(--color-shadow-lg);
  }

  .navbar-nav .nav-link {
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--color-border);
  }

  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }

  .nav-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    justify-content: flex-start;
    gap: 10px;
  }
}

/* ===================================
   6. Hero Section
   =================================== */
.hero-section {
  position: relative;
  background-color: var(--color-bg);
  overflow: hidden;
}

.hero-section .row {
  padding-top: 80px;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-name {
  font-size: 3.5rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.hero-title {
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 500;
  min-height: 2rem;
  margin-bottom: 20px;
}

.typewriter-cursor {
  animation: blink 1s step-end infinite;
  color: var(--color-primary);
  font-weight: 300;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-actions {
  margin-bottom: 8px;
}

.hero-actions .btn {
  padding: 10px 28px;
  font-weight: 500;
}

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

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

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Terminal */
.hero-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-terminal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #1e1e2e;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
  cursor: pointer;
  transition: box-shadow var(--transition-normal);
}

.hero-terminal:hover {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #181825;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dots .dot.red { background: #f38ba8; }
.terminal-dots .dot.yellow { background: #f9e2af; }
.terminal-dots .dot.green { background: #a6e3a1; }

.terminal-title {
  font-size: 0.75rem;
  color: #6c7086;
  letter-spacing: 0.5px;
}

.terminal-body {
  flex: 1;
  padding: 16px 20px;
  overflow: hidden;
  position: relative;
}

.terminal-lines {
  font-size: 0.82rem;
  line-height: 1.7;
  color: #cdd6f4;
  white-space: pre;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--color-primary);
  vertical-align: text-bottom;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Syntax highlighting — Catppuccin Mocha inspired */
.token-keyword { color: #cba6f7; }   /* purple */
.token-function { color: #89b4fa; }  /* blue */
.token-string { color: #a6e3a1; }    /* green */
.token-comment { color: #585b70; font-style: italic; }  /* gray */
.token-tag { color: #f38ba8; }       /* red/pink */
.token-attr { color: #fab387; }      /* peach */
.token-value { color: #a6e3a1; }     /* green */
.token-property { color: #89dceb; }  /* teal */
.token-number { color: #fab387; }    /* peach */
.token-punctuation { color: #9399b2; } /* overlay */
.token-variable { color: #f5c2e7; }  /* pink */

/* Light mode terminal */
[data-bs-theme="light"] .hero-terminal {
  background: #f8f9fc;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .hero-terminal:hover {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .terminal-header {
  background: #eff1f5;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .terminal-dots .dot.red { background: #d20f39; }
[data-bs-theme="light"] .terminal-dots .dot.yellow { background: #df8e1d; }
[data-bs-theme="light"] .terminal-dots .dot.green { background: #40a02b; }

[data-bs-theme="light"] .terminal-title { color: #8c8fa1; }

[data-bs-theme="light"] .terminal-lines { color: #4c4f69; }

[data-bs-theme="light"] .token-keyword { color: #8839ef; }
[data-bs-theme="light"] .token-function { color: #1e66f5; }
[data-bs-theme="light"] .token-string { color: #40a02b; }
[data-bs-theme="light"] .token-comment { color: #9ca0b0; }
[data-bs-theme="light"] .token-tag { color: #d20f39; }
[data-bs-theme="light"] .token-attr { color: #fe640b; }
[data-bs-theme="light"] .token-value { color: #40a02b; }
[data-bs-theme="light"] .token-property { color: #179299; }
[data-bs-theme="light"] .token-number { color: #fe640b; }
[data-bs-theme="light"] .token-punctuation { color: #7c7f93; }
[data-bs-theme="light"] .token-variable { color: #ea76cb; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.scroll-indicator a {
  color: var(--color-text-muted);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

.scroll-indicator a:hover {
  color: var(--color-primary);
}

/* ===================================
   7. Section Common
   =================================== */
.section {
  padding: var(--section-padding);
  position: relative;
  background-color: var(--color-bg);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-number {
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--color-text);
  opacity: 0.03;
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-top: 8px;
}

/* ===================================
   8. About Section
   =================================== */
.about-heading {
  font-size: 1.4rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.info-list {
  margin: 0;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item dt {
  font-weight: 500;
  color: var(--color-text);
  min-width: 130px;
  font-size: 0.9rem;
}

.info-item dt i {
  color: var(--color-primary);
  margin-right: 6px;
}

.info-item dd {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.info-item dd a {
  color: var(--color-primary);
}

/* Skills */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-item {
  width: 100%;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skill-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
}

.skill-percent {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-primary);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 10px;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-fill.animated {
  width: var(--skill-width);
}

/* ===================================
   9. Services Section
   =================================== */
.service-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
  height: 100%;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--color-shadow-lg);
  border-color: var(--color-primary);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(var(--color-primary-rgb), 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: all var(--transition);
}

.service-icon i {
  font-size: 1.8rem;
  color: var(--color-primary);
  transition: color var(--transition);
}

.service-card:hover .service-icon {
  background-color: var(--color-primary);
}

.service-card:hover .service-icon i {
  color: #ffffff;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ===================================
   10. Portfolio Section
   =================================== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.portfolio-grid {
  margin: 0 -12px;
  display: flex;
  flex-wrap: wrap;
}

.portfolio-item {
  width: 33.333%;
  padding: 12px;
  box-sizing: border-box;
}

.portfolio-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.portfolio-image {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.portfolio-placeholder-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.portfolio-overlay p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.portfolio-link {
  width: 44px;
  height: 44px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition);
}

.portfolio-link:hover {
  background-color: #ffffff;
  color: var(--color-primary);
}

/* ===================================
   11. Blog Section
   =================================== */
.blog-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--color-shadow-lg);
}

.blog-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-placeholder-text {
  font-size: 3rem;
  opacity: 0.3;
}

.blog-body {
  padding: 24px;
}

.blog-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.blog-body h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-body h3 a {
  color: var(--color-text);
  transition: color var(--transition);
}

.blog-body h3 a:hover {
  color: var(--color-primary);
}

.blog-body > p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-read-more i {
  transition: transform var(--transition);
}

.blog-read-more:hover i {
  transform: translateX(4px);
}

/* ===================================
   12. Contact Section
   =================================== */
.contact-heading {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.contact-text {
  color: var(--color-text-muted);
  margin-bottom: 30px;
  line-height: 1.7;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(var(--color-primary-rgb), 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.contact-item h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text);
  margin-bottom: 2px;
}

.contact-item p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 0.9rem;
}

.contact-item p a {
  color: var(--color-text-muted);
}

.contact-item p a:hover {
  color: var(--color-primary);
}

.contact-socials {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.social-link:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* Contact Form */
.contact-form .form-control {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all var(--transition);
}

.contact-form .form-control:focus {
  background-color: var(--color-bg);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.contact-form .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 500;
}

.form-status.success {
  color: #10b981;
}

.form-status.error {
  color: #ef4444;
}

/* ===================================
   13. Footer
   =================================== */
.site-footer {
  background-color: var(--color-text);
  padding: 30px 0;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
  font-size: 0.85rem;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  transition: color var(--transition);
}

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

.image-footer-copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  transition: color var(--transition);
  white-space: nowrap;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 20px;
}

.image-footer-copyright:hover {
  color: #ffffff;
}

@media (max-width: 767.98px) {
  .footer-right {
    justify-content: center;
    margin-top: 12px;
  }
}

/* ===================================
   14. Back to Top
   =================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 999;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-4px);
}

/* ===================================
   15. Dark Mode Overrides
   =================================== */
[data-bs-theme="dark"] {
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-light: #64748b;
  --color-border: #334155;
  --color-card-bg: #1e293b;
  --color-shadow: rgba(0, 0, 0, 0.3);
  --color-shadow-lg: rgba(0, 0, 0, 0.5);
  --color-overlay: rgba(15, 23, 42, 0.9);
}

[data-bs-theme="dark"] .navbar.scrolled {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .navbar-toggler-icon {
  filter: invert(1);
}

[data-bs-theme="dark"] .site-footer {
  background-color: #0c1222;
}

[data-bs-theme="dark"] .contact-form .form-control {
  background-color: var(--color-bg);
}

[data-bs-theme="dark"] .contact-form .form-control:focus {
  background-color: var(--color-bg);
}

/* Dark mode terminal is the default — no override needed */

[data-bs-theme="dark"] .section-number {
  opacity: 0.05;
}

/* ===================================
   16. Page Header (inner pages)
   =================================== */
.page-header {
  /*background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); */
  background: linear-gradient(135deg, var(--color-primary), #25282f);
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
  color: #ffffff;
  font-size: 2.8rem;
  margin-bottom: 12px;
  position: relative;
}

.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
  position: relative;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-nav a {
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition);
}

.breadcrumb-nav a:hover {
  color: #ffffff;
}

.breadcrumb-separator {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.4);
  user-select: none;
}

.breadcrumb-nav span.active {
  color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   17. Service Detail Page
   =================================== */
.service-detail-icon {
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.15), rgba(var(--color-primary-rgb), 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.service-detail-icon i {
  font-size: 4rem;
  color: var(--color-primary);
}

.service-detail-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0.15;
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.service-detail h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-detail p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 0.95rem;
}

.service-features li i {
  color: var(--color-primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  padding: 80px 0;
  position: relative;
}

.cta-section h2 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

/* ===================================
   18. Blog Post Page
   =================================== */
.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.post-meta-bar i {
  color: var(--color-primary);
}

.post-featured-image {
  height: 350px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-body {
  max-width: 100%;
}

.post-body p {
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: 20px;
  font-size: 1rem;
}

.post-body .post-lead {
  font-size: 1.15rem;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.8;
  border-left: 3px solid var(--color-primary);
  padding-left: 20px;
  margin-bottom: 32px;
}

.post-body h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--color-text);
}

.post-body blockquote {
  background-color: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  padding: 24px 28px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
}

.post-body blockquote p {
  color: var(--color-text);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Author Bio */
.post-author-bio {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 28px;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius);
  margin-top: 40px;
  margin-bottom: 32px;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar i {
  font-size: 4rem;
  color: var(--color-primary);
}

.author-info h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.author-info p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.author-info a {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Post Navigation */
.post-navigation {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--color-border);
  padding-top: 28px;
}

.post-nav-link {
  flex: 1;
  padding: 16px 20px;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  color: var(--color-text);
}

.post-nav-link:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.post-nav-link:hover .post-nav-label,
.post-nav-link:hover .post-nav-title {
  color: #ffffff;
}

.post-nav-link.next {
  text-align: right;
}

.post-nav-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-nav-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

/* ===================================
   19. Blog Sidebar
   =================================== */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-widget {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* Sidebar Search */
.sidebar-search {
  display: flex;
  gap: 8px;
}

.sidebar-search .form-control {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.9rem;
}

.sidebar-search .btn {
  flex-shrink: 0;
  padding: 8px 14px;
}

/* Sidebar Categories */
.sidebar-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-categories li {
  border-bottom: 1px solid var(--color-border);
}

.sidebar-categories li:last-child {
  border-bottom: none;
}

.sidebar-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.sidebar-categories a:hover {
  color: var(--color-primary);
}

.sidebar-categories .badge {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 10px;
}

/* Sidebar Recent Posts */
.sidebar-recent {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-recent li {
  border-bottom: 1px solid var(--color-border);
}

.sidebar-recent li:last-child {
  border-bottom: none;
}

.sidebar-recent a {
  display: block;
  padding: 10px 0;
  color: var(--color-text);
  transition: color var(--transition);
}

.sidebar-recent a:hover {
  color: var(--color-primary);
}

.recent-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.recent-date {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ===================================
   20. Single Portfolio Page
   =================================== */
.portfolio-single {
  max-width: 900px;
  margin: 0 auto;
}

.portfolio-featured-image {
  height: 400px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portfolio-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.portfolio-meta-bar i {
  color: var(--color-primary);
}

.portfolio-external-link {
  color: var(--color-primary);
  font-weight: 600;
}

.portfolio-external-link:hover {
  color: var(--color-primary-dark);
}

.portfolio-body {
  max-width: 100%;
}

.portfolio-body p {
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: 20px;
  font-size: 1rem;
}

.portfolio-body h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--color-text);
}

.portfolio-body img {
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

/* ===================================
   21. Archive Description
   =================================== */
.archive-description {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
  padding: 20px 24px;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

/* ===================================
   22. Animations
   =================================== */
@keyframes blink {
  50% { opacity: 0; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ===================================
   23. Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-indicator a {
    animation: none;
  }
}

/* Focus visible styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
