/* ==========================================================================
   Abdulrahman Soliman - Portfolio & CV Stylesheet
   Clean Executive Light Theme (Refined Slate #334155 & Royal Sky Blue #2563eb)
   ========================================================================== */

:root {
  --slate-heading: #334155;
  --slate-subheading: #475569;
  --slate-muted: #64748b;
  --brand-primary: #2563eb;
  --brand-primary-dark: #1d4ed8;
  --brand-sky: #0284c7;
  --brand-emerald: #059669;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-soft-blue: #eff6ff;
  --bg-soft-sky: #f0f9ff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(51, 65, 85, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(51, 65, 85, 0.07), 0 4px 10px -4px rgba(51, 65, 85, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(37, 99, 235, 0.12);
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--slate-subheading);
  line-height: 1.65;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6, .fw-heading {
  color: var(--slate-heading);
  letter-spacing: -0.015em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
  letter-spacing: 0;
}

/* Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow 0.25s ease;
}

.navbar-custom.scrolled {
  box-shadow: var(--shadow-sm);
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-sky));
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.nav-link-custom {
  color: var(--slate-subheading) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  color: var(--brand-primary) !important;
  background-color: var(--bg-soft-blue);
}

/* Hero Section - Bright & Airy Light Design */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 48%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 4.5rem 0 4.25rem;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.45;
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: var(--slate-heading);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(2.15rem, 4vw, 3.15rem);
  font-weight: 800;
  color: var(--slate-heading);
  line-height: 1.18;
}

.hero-subtitle {
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  font-weight: 700;
  color: var(--brand-primary);
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--slate-subheading);
  max-width: 640px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-action:hover {
  transform: translateY(-1px);
}

/* KPI Stat Cards */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, border-color 0.22s ease;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--slate-heading);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-muted);
}

/* Section Headers */
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  background: var(--bg-soft-blue);
  border: 1px solid #dbeafe;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--slate-heading);
}

.section-desc {
  color: var(--slate-muted);
  max-width: 660px;
  margin: 0 auto;
}

/* Timeline / Experience */
.timeline-wrapper {
  position: relative;
  padding-inline-start: 1.75rem;
  border-inline-start: 2px solid #cbd5e1;
}

.timeline-item {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item:hover {
  box-shadow: var(--shadow-md);
  border-color: #bfdbfe;
}

.timeline-dot {
  position: absolute;
  inset-inline-start: -2.28rem;
  top: 1.75rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px #dbeafe;
}

.timeline-item.current .timeline-dot {
  background: var(--brand-emerald);
  box-shadow: 0 0 0 3px #d1fae5;
}

.exp-list {
  padding-inline-start: 1.15rem;
  margin-bottom: 0;
}

.exp-list li {
  margin-bottom: 0.45rem;
  color: var(--slate-subheading);
  font-size: 0.95rem;
}

.exp-list li:last-child {
  margin-bottom: 0;
}

/* Designed Websites Showcase (Exact User Screenshots) */
.website-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.website-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #93c5fd;
}

.browser-topbar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  direction: ltr;
}

.browser-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.browser-dots span:nth-child(1) { background: #f87171; }
.browser-dots span:nth-child(2) { background: #fbbf24; }
.browser-dots span:nth-child(3) { background: #34d399; }

.browser-url {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.22rem 0.65rem;
  font-size: 0.76rem;
  color: var(--slate-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.browser-url:hover {
  color: var(--brand-primary);
  border-color: #bfdbfe;
}

.browser-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.browser-viewport img.site-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.45s ease;
}

.website-card:hover .browser-viewport img.site-screenshot {
  transform: scale(1.03);
}

.viewport-overlay {
  position: absolute;
  inset: 0;
  background: rgba(51, 65, 85, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.browser-viewport:hover .viewport-overlay {
  opacity: 1;
}

.website-card-body {
  padding: 1.45rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.website-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding-top: 1rem;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
}

.website-actions .btn {
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.48rem 1rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tech-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-subheading);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
}

/* Backend Systems Cards */
.filter-btn {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.45rem 1.05rem;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--slate-subheading);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #93c5fd;
  color: var(--brand-primary);
}

.filter-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.system-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.system-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #bfdbfe;
}

.system-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--bg-soft-blue);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Skills & Certifications */
.skill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.55rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--slate-heading);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.38rem 0.78rem;
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.skill-pill:hover {
  background: var(--bg-soft-blue);
  border-color: #bfdbfe;
  color: var(--brand-primary);
}

/* Contact Card */
.contact-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 20px;
  padding: 2.5rem 2rem;
}

.contact-item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 100%;
}

/* Modal Preview */
.preview-modal-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  display: block;
}

.preview-iframe {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #ffffff;
}

/* Print / PDF Styles */
@media print {
  .navbar-custom,
  .no-print,
  .website-actions,
  .viewport-overlay,
  .filter-bar,
  .toast-container {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    font-size: 11pt;
  }

  .hero-section {
    background: #ffffff !important;
    padding: 1rem 0 !important;
    border-bottom: 2px solid #cbd5e1 !important;
  }

  .hero-section::before {
    display: none !important;
  }

  section {
    padding: 1.25rem 0 !important;
  }

  .stat-card,
  .timeline-item,
  .website-card,
  .system-card,
  .skill-card {
    box-shadow: none !important;
    break-inside: avoid;
  }
}
