/* =====================================================
   Alrawatb.com - Main Stylesheet
   Version: 1.0.0
   Last Updated: 25 Aug. 2025 @ 6:50 pm
   Time zone: Dubai, UAE
   Primary Color: #1762f7
   Author: Alrawatb Development Team
   Target Performance: 100/100 PageSpeed Score
   ===================================================== */

/* =====================================================
   CHANGELOG
   =====================================================
   v1.0.0 (25 Aug 2025 @ 6:50 pm) - Initial release

   ADD HERE THE NEW UPDATE
   ===================================================== */

/* CSS Variables - Default Light Theme */
:root {
  /* Light Theme Colors */
  --bg: #ffffff;
  --panel: #f8f9fb;
  --text: #1a1d23;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1762f7;
  --accent-dark: #0f4bc5;
  --accent-light: #e8f0ff;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(23, 98, 247, 0.08);
  --danger: #dc2626;
  --warning: #f59e0b;
  --success: #10b981;
  
  /* Responsive Font Sizes */
  --fs-xs: clamp(0.625rem, 0.5rem + 0.5vw, 0.75rem);
  --fs-sm: clamp(0.75rem, 0.65rem + 0.5vw, 0.875rem);
  --fs-base: clamp(0.875rem, 0.8rem + 0.5vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.75vw, 1.375rem);
  --fs-xl: clamp(1.25rem, 1.1rem + 1vw, 1.625rem);
  --fs-2xl: clamp(1.5rem, 1.25rem + 1.5vw, 2rem);
  
  /* Spacing */
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-md: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --space-lg: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --space-xl: clamp(2rem, 1.75rem + 1.25vw, 3rem);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Transitions only for interactive elements */
button,
input,
select,
textarea,
.btn,
.card,
.explorer-card,
.nav-tab,
.tool-card,
.post-card,
.payscale-stat-card,
.main-dot,
.stat-terminal,
[data-variant],
[role="button"],
[type="submit"] {
  transition: background-color 0.2s ease, 
              border-color 0.2s ease, 
              color 0.2s ease,
              box-shadow 0.2s ease,
              opacity 0.2s ease,
              transform 0.2s ease;
}

/* HTML & Body */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', 'Tahoma', sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  min-height: 100vh;
  padding: clamp(0.5rem, 1vw, 1.25rem);
}

/* Icon System */
.icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

/* Main Terminal Container */
.main-terminal {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Main Terminal Bar */
.main-terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px dashed var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Terminal Body */
.terminal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.terminal-inner {
  padding: var(--space-md);
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-section:hover .logo-name {
  color: var(--accent);
}

.logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  line-height: 1;
}

.logo-name {
  color: var(--text);
  font-weight: 800;
  font-size: var(--fs-md);
}

/* Search Container */
.search-container {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  margin-inline: var(--space-sm);
}

.search-input {
  width: 100%;
  padding-block: var(--space-xs);
  padding-inline-start: var(--space-sm);
  padding-inline-end: calc(var(--space-xl) + 10px);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  font-family: inherit;
  font-size: var(--fs-sm);
}

.search-input::placeholder {
  color: var(--muted);
  opacity: .7;
}

.search-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-end: 4px;
  padding: 6px var(--space-sm);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: bold;
  font-family: inherit;
}

.search-btn:hover {
  background: var(--accent-dark);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Action Dots */
.main-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.main-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  color: white;
}

.main-dot:hover {
  border-color: var(--accent);
  filter: brightness(1.1);
}

.main-dot::after {
  content: attr(title);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-dot:hover::after,
.main-dot:focus-visible::after {
  opacity: 1;
}

/* Theme Toggle Button */
.theme-toggle {
  background: linear-gradient(135deg, #ffd93d, #ffbc11);
  position: relative;
}

.theme-toggle svg {
  position: absolute;
  transition: all 0.3s ease;
  pointer-events: none;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: scale(0.6) rotate(180deg);
}

/* Language Toggle Button */
.lang-toggle {
  background: linear-gradient(135deg, #667eea, #764ba2);
  position: relative;
}

.lang-toggle .lang-text {
  font-size: 10px;
  font-weight: bold;
  color: white;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.main-dot.compare-dot {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.main-dot.calc-dot {
  background: linear-gradient(135deg, #4ade80, #22c55e);
}

.main-dot svg {
  pointer-events: none;
}

/* Regular Dots */
.dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-inline-start: auto;
  width: 38px;
  height: 10px;
  position: relative;
}

.dots::before,
.dots::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  top: 0;
}

.dots::before {
  left: 0;
  background: var(--danger);
}

.dots::after {
  right: 0;
  background: var(--success);
}

.dots {
  background: radial-gradient(circle, var(--warning) 5px, transparent 5px);
  background-position: center;
  background-repeat: no-repeat;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  background: var(--bg);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-tab {
  flex: 0 0 auto;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  border: none;
  text-decoration: none;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.nav-tab.active {
  background: var(--accent);
  color: white;
}

.nav-tab:hover:not(.active) {
  background: var(--accent-light);
  color: var(--accent);
}

/* Hero Section */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr min(380px, 100%);
  gap: var(--space-lg);
  align-items: start;
}

html[dir="ltr"] .hero-grid {
  grid-template-columns: min(380px, 100%) 1fr;
}

.hero-title {
  font-size: var(--fs-2xl);
  color: var(--accent);
  font-weight: 800;
  text-shadow: 0 0 20px rgba(23, 98, 247, .15);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.hero-description {
  padding: var(--space-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-description p {
  margin-bottom: var(--space-lg);
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.7;
}

/* Quick Stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s ease;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* Hero Actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Button Styles */
.btn {
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn[data-variant="primary"] {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.btn[data-variant="primary"]:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn[data-variant="secondary"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn[data-size="large"] {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--fs-base);
}

/* Calculator Widget */
.calculator-widget {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Unified Terminal Bar */
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.terminal-bar .title {
  font-weight: 800;
  color: var(--accent);
  font-size: var(--fs-base);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.widget-content {
  padding: var(--space-sm);
}

/* Form Styles */
.quick-calc-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 600;
}

.form-field input,
.form-field select {
  padding: var(--space-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  font-family: inherit;
  font-size: var(--fs-sm);
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-calculate {
  padding: var(--space-sm);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-sm);
  font-family: inherit;
}

.btn-calculate:hover {
  background: var(--accent-dark);
}

.quick-result {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-align: center;
}

.result-label {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 8px;
}

.result-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--accent);
}

html[dir="rtl"] .result-value::after {
  content: ' ريال';
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: normal;
}

html[dir="ltr"] .result-value::after {
  content: ' SAR';
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: normal;
}

/* Statistics Section */
.stats-terminal {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.stats-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
}

.stat-terminal {
  padding: var(--space-lg);
  text-align: center;
  background: var(--bg);
  border-inline-end: 1px solid var(--line);
}

.stat-terminal:last-child {
  border-inline-end: none;
}

.stat-terminal:hover {
  background: var(--accent-light);
}

.stat-terminal .stat-label {
  font-size: var(--fs-md);
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.stat-terminal .stat-value {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 5px;
  font-family: monospace;
}

.stat-terminal .stat-meta {
  font-size: var(--fs-md);
  color: var(--muted);
  opacity: .8;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s ease;
}

.section-title {
  font-size: var(--fs-lg);
  color: var(--accent);
  font-weight: 800;
  margin-top: 25px;
  margin-bottom: 25px;
}

.section-link {
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
}

.section-link:hover {
  color: var(--accent);
}

/* Section Spacing */
.hero-section,
.stats-section,
.explorer-section,
.tools-section,
.posts-section {
  margin-bottom: var(--space-xl);
}

/* Explorer Grid */
.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.explorer-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.explorer-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(23, 98, 247, .15);
}

.explorer-list {
  list-style: none;
  padding: var(--space-xs);
  font-weight: 600;
}

.explorer-list li {
  margin-bottom: var(--space-xs);
}

.explorer-list a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm);
  border-radius: 4px;
  font-size: var(--fs-sm);
}

.explorer-list a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.badge {
  font-size: var(--fs-xs);
  padding: 2px 6px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: bold;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.tool-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tool-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 98, 247, .15);
}

.tool-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.tool-card:hover .tool-icon {
  background: var(--accent);
  transform: scale(1.1);
  color: white;
}

.tool-card h3 {
  font-size: var(--fs-md);
  color: var(--accent);
  margin: 0;
  font-weight: 700;
}

.tool-card p {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: var(--text);
}

.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(23, 98, 247, .15);
}

.post-card:hover .thumbnail {
  transform: scale(1.05);
}

.post-content {
  padding: 0;
}

.post-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 1.91;
  background: linear-gradient(135deg, var(--accent-light), var(--panel));
  overflow: hidden;
}

.post-thumbnail .thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85), transparent);
  font-size: var(--fs-md);
  color: var(--text);
  margin: 0;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: var(--space-md);
}

.meta-date {
  padding: 2px 6px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* Footer */
.footer-main {
  margin-top: var(--space-xl);
  background: var(--panel);
  border-top: 2px solid var(--line);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Newsletter Section */
.newsletter-section {
  padding: var(--space-xl) var(--space-lg);
  background: var(--accent-light);
  border-bottom: 1px solid var(--line);
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.newsletter-title {
  font-size: var(--fs-lg);
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 800;
}

.newsletter-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--space-lg);
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto var(--space-lg);
  position: relative;
}

.newsletter-input {
  width: 100%;
  padding-block: var(--space-sm);
  padding-inline-start: var(--space-md);
  padding-inline-end: calc(var(--space-xl) + 40px);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  font-family: inherit;
  font-size: var(--fs-sm);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 98, 247, .1);
}

.newsletter-input::placeholder {
  color: var(--muted);
  opacity: .7;
}

.btn-newsletter {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-end: 4px;
  padding: var(--space-xs) var(--space-md);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: bold;
  font-family: inherit;
}

.btn-newsletter:hover {
  background: var(--accent-dark);
}

.newsletter-benefits {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  font-size: var(--fs-sm);
  color: var(--muted);
  flex-wrap: wrap;
}

/* Footer Content */
.footer-content {
  padding: var(--space-xl) var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-column h4 {
  font-size: var(--fs-sm);
  color: var(--accent);
  margin-bottom: var(--space-md);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-column p {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
  transition: border-color 0.3s ease;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  z-index: 1000;
  background: var(--accent);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  font-size: var(--fs-sm);
  font-weight: 600;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--panel);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* =====================================================
   DARK THEME - Consolidated at End for Performance
   ===================================================== */
[data-theme="dark"] {
  --bg: #0a0c0f;
  --panel: #0e1117;
  --text: #d9e5ff;
  --muted: #7a9cc0;
  --line: #1c2940;
  --accent: #4885ff;
  --accent-dark: #2563eb;
  --accent-light: rgba(72, 133, 255, .1);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --danger: #ff5f56;
  --warning: #ffbd2e;
  --success: #27c93f;
}

[data-theme="dark"] .main-terminal-bar {
  background: rgba(28, 41, 64, .3);
}

[data-theme="dark"] .search-input {
  border: 1px dashed var(--line);
  background: rgba(28, 41, 64, .2);
}

[data-theme="dark"] .search-input:focus {
  box-shadow: 0 0 0 2px rgba(72, 133, 255, .1);
}

[data-theme="dark"] .main-dot {
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .main-dot:hover {
  filter: brightness(1.2);
}

[data-theme="dark"] .main-dot::after {
  background: var(--panel);
}

[data-theme="dark"] .theme-toggle {
  background: linear-gradient(135deg, #4a5568, #2d3748);
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: scale(0.6) rotate(180deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .nav-tabs {
  border: 1px dashed var(--line);
  background: rgba(28, 41, 64, .05);
}

[data-theme="dark"] .nav-tab:hover:not(.active) {
  background: rgba(72, 133, 255, .1);
}

[data-theme="dark"] .hero-title {
  text-shadow: 0 0 20px rgba(72, 133, 255, .3);
}

[data-theme="dark"] .hero-description {
  background: rgba(28, 41, 64, .1);
  border: 1px dashed var(--line);
  box-shadow: none;
}

[data-theme="dark"] .quick-stats {
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

[data-theme="dark"] .btn {
  border: 1px dashed var(--line);
  background: transparent;
}

[data-theme="dark"] .btn:hover {
  background: rgba(72, 133, 255, .1);
}

[data-theme="dark"] .btn[data-variant="secondary"] {
  background: rgba(72, 133, 255, .1);
}

[data-theme="dark"] .calculator-widget {
  background: rgba(28, 41, 64, .1);
  box-shadow: none;
}

[data-theme="dark"] .terminal-bar {
  border-bottom: 1px dashed var(--line);
  background: rgba(28, 41, 64, .3);
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field select {
  border: 1px dashed var(--line);
  background: rgba(28, 41, 64, .2);
}

[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field select:focus {
  box-shadow: 0 0 0 2px rgba(72, 133, 255, .1);
}

[data-theme="dark"] .quick-result {
  background: rgba(72, 133, 255, .1);
  border: 1px dashed var(--accent);
}

[data-theme="dark"] .stats-terminal {
  background: rgba(28, 41, 64, .1);
  box-shadow: none;
}

[data-theme="dark"] .stat-terminal {
  background: rgba(28, 41, 64, .05);
  border-inline-end: 1px dashed var(--line);
}

[data-theme="dark"] .stat-terminal:hover {
  background: rgba(72, 133, 255, .05);
}

[data-theme="dark"] .section-header {
  border-bottom: 1px dashed var(--line);
}

[data-theme="dark"] .explorer-card {
  background: rgba(28, 41, 64, .1);
  box-shadow: none;
}

[data-theme="dark"] .explorer-card:hover {
  box-shadow: 0 4px 12px rgba(72, 133, 255, .2);
}

[data-theme="dark"] .explorer-list a:hover {
  background: rgba(72, 133, 255, .1);
}

[data-theme="dark"] .tool-card {
  background: rgba(28, 41, 64, .1);
  box-shadow: none;
}

[data-theme="dark"] .tool-card:hover {
  background: rgba(72, 133, 255, .05);
  box-shadow: 0 4px 12px rgba(72, 133, 255, .2);
}

[data-theme="dark"] .tool-icon {
  background: rgba(72, 133, 255, .1);
}

[data-theme="dark"] .post-card {
  background: rgba(28, 41, 64, .1);
  box-shadow: none;
}

[data-theme="dark"] .post-card:hover {
  box-shadow: 0 4px 12px rgba(72, 133, 255, .2);
}

[data-theme="dark"] .post-thumbnail {
  background: linear-gradient(135deg, rgba(72, 133, 255, 0.1), rgba(28, 41, 64, 0.2));
}

[data-theme="dark"] .post-title {
  background: linear-gradient(to top, rgba(10, 12, 15, 0.95), rgba(10, 12, 15, 0.7), transparent);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .meta-date {
  background: rgba(72, 133, 255, 0.1);
}

[data-theme="dark"] .newsletter-section {
  background: rgba(72, 133, 255, .05);
  border-bottom: 1px dashed var(--line);
}

[data-theme="dark"] .newsletter-input {
  border: 1px dashed var(--line);
  background: rgba(28, 41, 64, .2);
}

[data-theme="dark"] .newsletter-input:focus {
  box-shadow: 0 0 0 2px rgba(72, 133, 255, .1);
}

[data-theme="dark"] .social-links a {
  background: rgba(72, 133, 255, .1);
  border: 1px dashed var(--line);
}

[data-theme="dark"] .footer-bottom {
  border-top: 1px dashed var(--line);
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-container {
    display: none !important;
  }
  
  .terminal-inner {
    padding: var(--space-md);
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-terminal {
    border-inline-end: none;
    border-bottom: 1px solid var(--line);
  }
  
  [data-theme="dark"] .stat-terminal {
    border-bottom: 1px dashed var(--line);
  }
  
  .stat-terminal:nth-child(odd) {
    border-inline-end: 1px solid var(--line);
  }
  
  [data-theme="dark"] .stat-terminal:nth-child(odd) {
    border-inline-end: 1px dashed var(--line);
  }
  
  .stat-terminal:last-child,
  .stat-terminal:nth-last-child(2) {
    border-bottom: none;
  }
  
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  body {
    padding: var(--space-xs);
  }
  
  .main-terminal-bar {
    padding: var(--space-xs);
  }
  
  .terminal-inner {
    padding: var(--space-sm);
  }
  
  .explorer-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}