@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@400;500;700&family=DM+Sans:wght@400;500;700&display=swap');

/* Army Green Color Palette */
:root {
  --primary: #4B5320;
  --secondary: #6B8E23;
  --accent: #B2B377;
  --background-light: #A9BA9D;
  --background-dark: #222;
  --surface: #fff;
  --text-dark: #222;
  --text-light: #fff;
  --error: #FF5252;
  --success: #00C853;
  --info: #FFD600;
}

body {
  background-color: var(--background-light) !important;
  color: var(--text-dark) !important;
  font-family: 'Inter', 'Poppins', 'DM Sans', 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  scroll-behavior: smooth;
  font-size: 1.1rem;
  direction: ltr;
}

html[dir="rtl"] body {
  direction: rtl;
}

/* Navbar */
.navbar, .footer, footer, section, main, .card, .accordion-item {
  background-color: var(--surface) !important;
  color: var(--text-dark) !important;
}

.navbar {
  transition: box-shadow 0.3s, background 0.3s, padding 0.3s;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.04);
  padding: 1.25rem 0;
}
.navbar.scrolled {
  background: #fff !important;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
  padding: 0.5rem 0;
}
.navbar .navbar-brand {
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.02em;
  color: var(--primary) !important;
  transition: color 0.2s;
}
.navbar .nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  transition: color 0.2s, background 0.2s;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}
.navbar .nav-link.active, .navbar .nav-link:focus, .navbar .nav-link:hover {
  color: var(--text-light) !important;
  background: var(--primary) !important;
}

/* Hero Section */
.hero-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(120deg, var(--background-light) 60%, var(--accent) 100%);
  position: relative;
  padding: 5rem 1rem 3rem 1rem;
}
.hero-section .headline {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}
.hero-section .desc {
  font-size: 1.25rem;
  color: #444;
  margin-bottom: 2rem;
}
.hero-section .cta-btn {
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 2rem;
  padding: 0.75rem 2rem;
  margin: 0 0.5rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px 0 rgba(75,83,32,0.08);
}
.hero-section .cta-btn-primary {
  background: var(--primary);
  color: var(--text-light);
  border: none;
}
.hero-section .cta-btn-primary:hover, .hero-section .cta-btn-primary:focus {
  background: var(--secondary);
  color: var(--text-light);
}
.hero-section .cta-btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.hero-section .cta-btn-secondary:hover, .hero-section .cta-btn-secondary:focus {
  background: var(--primary);
  color: var(--text-light);
}

/* Feature Boxes */
.feature-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
}
.feature-box {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px 0 rgba(75,83,32,0.06);
  padding: 2rem 1.5rem;
  text-align: center;
  width: 260px;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  border: 1px solid var(--accent);
}
.feature-box:hover {
  box-shadow: 0 8px 32px 0 rgba(75,83,32,0.12);
  transform: translateY(-6px) scale(1.03);
}
.feature-box .icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: color 0.2s;
}
.feature-box:hover .icon {
  color: var(--info);
}
.feature-box .title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.feature-box .desc {
  color: #666;
  font-size: 1rem;
}

/* Cards, Accordions, Shadows */
.card, .accordion-item {
  border-radius: 1.25rem !important;
  box-shadow: 0 2px 16px 0 rgba(75,83,32,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover, .accordion-item:hover {
  box-shadow: 0 8px 32px 0 rgba(75,83,32,0.12);
  transform: translateY(-4px) scale(1.01);
}

/* Buttons */
.btn, .btn-primary, .btn-danger, .btn-outline-light {
  font-family: 'Poppins', 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
  border-radius: 2rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px 0 rgba(75,83,32,0.08);
}
.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  border: none;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--secondary);
  color: var(--text-light);
}
.btn-danger {
  background-color: var(--error);
  color: var(--text-light);
  border: none;
}
.btn-danger:hover, .btn-danger:focus {
  background-color: #b85c3a;
}
.btn-outline-light {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}
.btn-outline-light:hover, .btn-outline-light:focus {
  background: var(--primary);
  color: var(--text-light);
}
.btn-warning {
  background-color: var(--info);
  color: var(--text-dark);
  border: none;
}
.btn-warning:hover, .btn-warning:focus {
  background-color: #ffe866;
  color: var(--text-dark);
}
.btn-outline-primary {
  border-color: #7289da;
  color: #7289da;
  background: #fff;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background: #7289da;
  color: #fff;
}

/* Badges */
.badge.bg-primary {
  background-color: var(--primary) !important;
  color: var(--text-light) !important;
}
.badge.bg-secondary {
  background-color: var(--error) !important;
  color: var(--text-light) !important;
}

/* Section Spacing */
section, .section {
  padding: 4rem 0;
}

/* Footer */
footer, .footer {
  border-top: 1px solid var(--accent);
  padding: 2rem 0 1rem 0;
  background: var(--surface) !important;
  color: var(--text-dark) !important;
}
footer .social-icons a {
  color: var(--primary);
  margin: 0 0.5rem;
  font-size: 1.5rem;
  transition: color 0.2s;
}
footer .social-icons a:hover {
  color: var(--info);
}
footer .back-to-top {
  position: fixed;
  bottom: 4.5rem;
  right: 2.5rem;
  z-index: 1050;
  display: none;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 8px 0 rgba(75,83,32,0.12);
  border: none;
  transition: background 0.2s, color 0.2s;
}
footer .back-to-top:hover {
  background: var(--primary);
  color: var(--text-light);
}

/* Animations (AOS fallback) */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(.4,0,.2,1);
}
[data-aos].aos-animate {
  opacity: 1;
  transform: none;
  }

/* Floating Labels for Forms */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  opacity: 0.85;
  transform: scale(0.85) translateY(-1.5rem) translateX(0.15rem);
  color: var(--primary);
}

/* RTL Support */
html[dir="rtl"] .navbar, html[dir="rtl"] .footer, html[dir="rtl"] footer, html[dir="rtl"] section, html[dir="rtl"] main, html[dir="rtl"] .card, html[dir="rtl"] .accordion-item {
  direction: rtl;
}

::-webkit-scrollbar {
  width: 8px;
  background: #fff;
}
::-webkit-scrollbar-thumb {
  background: #e6e2d3;
  border-radius: 4px;
}

/* --- Video Page Styles --- */
.video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  background: #fff;
  display: block;
}
.video-thumb:hover {
  box-shadow: 0 8px 32px 0 rgba(75,83,32,0.12);
  transform: translateY(-4px) scale(1.03);
}
.video-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 1.25rem;
  transition: filter 0.2s;
}
.video-thumb .play-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.video-thumb:hover .play-overlay {
  opacity: 1;
}
.video-thumb .play-overlay i {
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.75rem;
  color: #222;
  text-align: center;
  min-height: 2.5rem;
}
.video-tabs .nav-link.active {
  background: var(--primary) !important;
  color: var(--text-light) !important;
}
.video-tabs .nav-link {
  color: var(--primary);
  font-weight: 600;
  border-radius: 2rem;
  margin: 0 0.25rem;
  transition: background 0.2s, color 0.2s;
}

/* --- Blog Card Styles --- */
.blog-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-card:hover {
  box-shadow: 0 8px 32px 0 rgba(75,83,32,0.12);
  transform: translateY(-4px) scale(1.02);
}
.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f5f5f5;
  display: block;
  padding: 8px;
}
.blog-card-body {
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.blog-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #222;
}
.blog-card-date {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.blog-card-summary {
    font-size: 1rem;
  color: #444;
  margin-bottom: 1.25rem;
  flex: 1 1 auto;
}
.blog-card-btn {
  align-self: flex-start;
  background: var(--primary);
  color: var(--text-light);
  border: none;
  border-radius: 2rem;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  box-shadow: 0 2px 8px 0 rgba(75,83,32,0.08);
  display: inline-block;
}
.blog-card-btn:hover {
  background: var(--secondary);
  transform: scale(1.06);
  color: var(--text-light);
}
@media (max-width: 575.98px) {
  .blog-card-img { height: 140px; }
  .blog-card-body { padding: 1rem; }
}

.tech-stack-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: inline-block;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .footer, footer {
  font-family: 'Poppins', 'Inter', 'DM Sans', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
}

.navbar .nav-link, .navbar .btn, .btn, label, .form-label {
  font-family: 'Inter', 'Poppins', 'DM Sans', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
}

.card, .accordion-item, .feature-box, .blog-card, .blog-card-body, .blog-card-title, .blog-card-summary, .blog-card-date, .badge, .form-control, .form-floating label, .timeline-content, .badge-card {
  font-family: 'Inter', 'Poppins', 'DM Sans', 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
}

/* Hero Section Responsive Fixes */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.hero-section .row {
  min-height: 100vh;
  align-items: center;
}
.hero-section .col-lg-6 {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 991.98px) {
  .hero-section .row {
    min-height: 80vh;
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .hero-section .col-lg-6 {
  align-items: center;
    text-align: center !important;
  padding-bottom: 32px;
  }
  .hero-img-circle {
    width: 220px !important;
    height: 220px !important;
  }
  .hero-img-circle img {
    width: 140px !important;
    height: 140px !important;
  }
}
@media (max-width: 600px) {
  .hero-section .row {
    min-height: 70vh;
    padding-top: 18px;
    padding-bottom: 18px;
  }
  .hero-section .col-lg-6 {
    padding-bottom: 18px;
  }
  .hero-img-circle {
    width: 140px !important;
    height: 140px !important;
  }
  .hero-img-circle img {
    width: 80px !important;
    height: 80px !important;
  }
  .hero-section h1 {
    font-size: 2.1rem !important;
  }
  .hero-section .btn {
    font-size: 1rem !important;
    padding: 0.75rem 1.5rem !important;
  }
}

@media (max-width: 991.98px) {
  .navbar .navbar-brand {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }
  .navbar .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
  width: 100%;
  }
  .navbar .nav-link {
  width: 100%;
    margin-bottom: 0.25rem;
    text-align: left;
  }
  .navbar .btn {
  width: 100%;
    margin-top: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    display: block;
  }
  .modern-timeline {
    margin-left: 0 !important;
  }
  .vertical-timeline {
    margin-left: 0;
    margin-top: 24px;
  }
  .about-me-text {
    text-align: center;
  }
  .profile-img-responsive {
    width: 180px !important;
    height: 180px !important;
    margin-bottom: 18px;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}
@media (max-width: 600px) {
  .profile-img-responsive {
    width: 120px !important;
    height: 120px !important;
    margin-bottom: 14px;
  }
}

/* Vertical Timeline Styles */
.vertical-timeline {
    position: relative;
  min-height: 260px;
  margin-left: 24px;
  margin-top: 16px;
  margin-bottom: 16px;
}
.vtimeline-line {
    position: absolute;
  left: 24px;
    top: 0;
    bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #2979FF 0%, #7C4DFF 100%);
  border-radius: 2px;
  z-index: 1;
  }
.vtimeline-step {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  min-height: 60px;
  }
.vtimeline-dot {
  width: 24px;
  height: 24px;
  background: #2979FF;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(41,121,255,0.15);
  position: absolute;
  left: 12px;
  z-index: 2;
    top: 0;
}
.vtimeline-step:first-child .vtimeline-dot {
    top: 0;
}
.vtimeline-content {
  margin-left: 48px;
  background: none;
  padding: 0 0 12px 0;
  }
.vtimeline-year {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2979FF;
  margin-bottom: 2px;
  }
.vtimeline-desc {
    font-size: 1rem;
  color: #181A20;
  opacity: 0.85;
  }
@media (max-width: 600px) {
  .vertical-timeline {
    margin-left: 12px;
  }
  .vtimeline-line {
    left: 12px;
  }
  .vtimeline-dot {
    left: 0;
  }
  .vtimeline-content {
    margin-left: 36px;
  }
}

.tech-stack-logo {
  height: 38px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  margin-left: 8px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(75,83,32,0.07);
  background: var(--surface);
  padding: 2px 4px;
}

.hero-img-circle {
  animation: hero-float 5.5s ease-in-out infinite alternate;
  box-shadow: 0 8px 32px rgba(75,83,32,0.10);
}

@keyframes hero-float {
  0% {
    transform: translateY(0px) scale(1);
    box-shadow: 0 8px 32px rgba(75,83,32,0.10);
  }
  50% {
    transform: translateY(-18px) scale(1.025);
    box-shadow: 0 16px 48px rgba(75,83,32,0.13);
  }
  100% {
    transform: translateY(0px) scale(1);
    box-shadow: 0 8px 32px rgba(75,83,32,0.10);
  }
}

/* Loading animation for images */
img {
  transition: opacity 0.3s ease-in-out;
}

img[src*="placeholder"] {
  opacity: 0.8;
}

/* Smooth page transitions */
.page-transition {
  opacity: 0;
  animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Improved focus states for accessibility */
.btn:focus, .nav-link:focus, .form-control:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: var(--text-light);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Blog cover image styles */
.blog-cover {
  max-width: 100%;
  max-height: 250px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .blog-cover {
    max-height: 200px;
  }
}

@media (max-width: 576px) {
  .blog-cover {
    max-height: 150px;
  }
}