/* =============================================
   PORTFOLIO DESIGN SYSTEM
   Brand: #3f0061 | Clean, Modern, Professional
   ============================================= */

:root {
  --primary:       #3f0061;
  --primary-light: #6a0dad;
  --primary-glow:  rgba(63, 0, 97, 0.12);
  --primary-faint: #faf7ff;
  --accent:        #9b59b6;
  --dark:          #1a1a2e;
  --body-bg:       #ffffff;
  --card-bg:       #ffffff;
  --muted:         #6c757d;
  --border:        rgba(63, 0, 97, 0.15);
  --shadow-sm:     0 2px 12px rgba(63, 0, 97, 0.08);
  --shadow:        0 4px 24px rgba(63, 0, 97, 0.12);
  --shadow-lg:     0 8px 40px rgba(63, 0, 97, 0.18);
  --radius:        12px;
  --radius-lg:     20px;
  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: var(--body-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

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

/* ── LOADING SCREEN ────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(63,0,97,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── NAVBAR ────────────────────────────────── */
.portfolio-navbar {
  background: rgba(20, 0, 40, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.75rem 0;
  transition: var(--transition);
}
.portfolio-navbar.scrolled {
  background: rgba(10, 0, 25, 0.98) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.navbar-brand.logo {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 1.5px;
  color: #ffffff !important;
  text-decoration: none;
}
.navbar-brand.logo span {
  background: linear-gradient(135deg, #fff 0%, #d9b8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85) !important;
  padding: 0.5rem 0.9rem !important;
  border-radius: 8px;
  transition: var(--transition);
  margin: 0 2px;
  position: relative;
}
.nav-link:hover,
.nav-link.active {
  color: #ffffff !important;
  background: rgba(255,255,255,0.1);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #c084fc, #e879f9);
  border-radius: 2px;
}
.dropdown-menu {
  background: rgba(15,0,30,0.97) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: var(--radius) !important;
  padding: 0.5rem;
  backdrop-filter: blur(16px);
  margin-top: 8px !important;
}
.dropdown-item {
  color: rgba(255,255,255,0.8) !important;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}
.dropdown-item:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
}

/* ── SECTION HEADINGS ─────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}
.section-heading .label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary-light);
  background: var(--primary-faint);
  border: 1px solid var(--border);
  padding: 4px 16px;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}
.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--dark);
  margin-bottom: 0.75rem;
}
.section-heading p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
}
.section-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

/* ── BUTTONS ─────────────────────────────── */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(63, 0, 97, 0.3);
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(63, 0, 97, 0.4);
  color: #ffffff;
}
.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline-custom:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ── HERO ────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(145deg, #0f0020 0%, #1a0035 40%, #3f0061 100%);
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106,13,173,0.4) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155,89,182,0.2) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  pointer-events: none;
}
.hero-photo-wrap {
  position: relative;
  display: inline-block;
}
.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.25);
  box-shadow: 0 0 0 8px rgba(255,255,255,0.06), 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}
.hero-photo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(200,150,255,0.4);
  animation: rotate-ring 20s linear infinite;
}
@keyframes rotate-ring { to { transform: rotate(360deg); } }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #d9b8ff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.hero-title span {
  background: linear-gradient(135deg, #c084fc, #f0abfc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: #c084fc;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

/* ── PHOTO GRID ───────────────────────────── */
.photo-grid-section { padding: 0; }
.photo-grid-section .item { overflow: hidden; }
.photo-grid-section .image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}
.photo-grid-section .item:hover .image { transform: scale(1.05); }

/* ── SERVICES ─────────────────────────────── */
.services-section { padding: 5rem 0; background: var(--primary-faint); }
.service-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
  border-radius: inherit;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover .service-icon,
.service-card:hover .service-title,
.service-card:hover .service-desc { color: #ffffff; }
.service-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-faint), rgba(155,89,182,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.service-card:hover .service-icon-wrap {
  background: rgba(255,255,255,0.15);
}
.service-icon {
  font-size: 2rem;
  color: var(--primary);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.service-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}
.service-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

/* ── SKILLS ───────────────────────────────── */
.skills-section { padding: 5rem 0; background: #ffffff; }
.skill-category-label {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 4px;
  margin-bottom: 1.5rem;
}
.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.skill-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(63,0,97,0.15);
  margin-bottom: 0.75rem;
  transition: var(--transition);
}
.skill-card:hover .skill-img {
  border-color: var(--primary);
  transform: scale(1.05);
}
.skill-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

/* ── TESTIMONIALS ─────────────────────────── */
.testimonials-section { padding: 5rem 0; background: var(--primary-faint); }
.testimonial-card-new {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}
.testimonial-card-new::before {
  content: '\201C';
  position: absolute;
  top: 1rem;
  left: 2rem;
  font-size: 5rem;
  color: rgba(63,0,97,0.08);
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonial-quote i {
  color: var(--primary);
  font-size: 1.5rem;
  opacity: 0.7;
  margin-bottom: 1rem;
  display: block;
}
.testimonial-text {
  font-size: 1rem;
  color: #444;
  line-height: 1.8;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}
.testimonial-author img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}
.testimonial-author .name { font-weight: 700; font-size: 0.95rem; }
.testimonial-author .pos { font-size: 0.8rem; color: var(--muted); }
.star-rating i { font-size: 13px; }
.star-rating i.text-warning { color: #f6c90e !important; }
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: none !important;
  background-image: none !important;
}
.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.carousel-btn:hover { background: var(--primary-light); transform: translateY(-50%) scale(1.05); }
.carousel-btn-prev { left: 0; }
.carousel-btn-next { right: 0; }
.carousel-indicators [data-bs-target] {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background-color: var(--accent) !important;
  opacity: 0.4;
  border: none !important;
}
.carousel-indicators .active { opacity: 1 !important; }

/* ── ABOUT / CTA BAND ─────────────────────── */
.about-band {
  background: linear-gradient(135deg, #2a0048, #3f0061, #5c0090);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.about-band::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}
.about-band h3 { color: #ffffff; font-size: 1.6rem; }
.about-band p { color: rgba(255,255,255,0.75); font-size: 0.97rem; line-height: 1.8; }

/* ── NEWSLETTER ───────────────────────────── */
.newsletter-section { padding: 4rem 0; background: #ffffff; }
.newsletter-wrap {
  background: var(--primary-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
}
.newsletter-wrap h2 { color: var(--primary); font-size: 1.6rem; margin-bottom: 0.5rem; }
.newsletter-wrap p { color: var(--muted); margin-bottom: 1.5rem; }
.newsletter-wrap .form-control {
  border-color: var(--border);
  border-radius: 8px 0 0 8px !important;
  height: 48px;
  font-size: 0.9rem;
}
.newsletter-wrap .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63,0,97,0.1);
}
.newsletter-wrap .btn-subscribe {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 8px 8px 0 !important;
  padding: 0 1.5rem;
  font-weight: 600;
  height: 48px;
  transition: var(--transition);
}
.newsletter-wrap .btn-subscribe:hover { background: var(--primary-light); }

/* ── FOOTER ───────────────────────────────── */
.site-footer {
  background: #0d0020;
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 1.5rem;
}
.footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #d9b8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.footer-tagline { font-size: 0.875rem; opacity: 0.6; max-width: 240px; }
.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: #d9b8ff; }
.footer-social { display: flex; gap: 0.75rem; }
.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}
.social-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}
.footer-divider {
  border-color: rgba(255,255,255,0.07);
  margin: 2rem 0 1.5rem;
}
.footer-copy { font-size: 0.82rem; opacity: 0.45; text-align: center; }

/* ── CV PAGE ──────────────────────────────── */
.cv-hero {
  background: linear-gradient(145deg, #0f0020, #3f0061);
  padding: 7rem 0 3rem;
  text-align: center;
}
.cv-hero img {
  width: 140px; height: 140px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(255,255,255,0.25);
  box-shadow: 0 0 0 8px rgba(255,255,255,0.07);
  margin-bottom: 1.25rem;
}
.cv-hero p { color: rgba(255,255,255,0.75); max-width: 540px; margin: 0 auto; }
.cv-section { padding: 3rem 0; }
.cv-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}
.cv-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--primary-faint);
  z-index: 1;
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -2rem;
  width: 2px;
  background: var(--border);
}
.timeline-item:last-child::after { display: none; }
.timeline-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; color: var(--dark); }
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 0.75rem;
}
.timeline-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 50px;
  background: var(--primary-faint);
  color: var(--primary);
  border: 1px solid var(--border);
}
.timeline-date {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.timeline-body { font-size: 0.9rem; color: #555; line-height: 1.7; }
.cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  transition: var(--transition);
  margin-bottom: 0.75rem;
}
.cert-item:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.cert-name { font-weight: 700; font-size: 0.95rem; color: var(--dark); }
.cert-platform {
  font-size: 0.75rem; font-weight: 600;
  padding: 3px 12px; border-radius: 50px;
  background: rgba(155,89,182,0.1); color: var(--primary-light);
  border: 1px solid rgba(155,89,182,0.2);
}
.hobbies-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 0;
}
.hobby-tag {
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--primary-faint);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

/* ── PROJECTS PAGE ────────────────────────── */
.projects-hero {
  background: linear-gradient(145deg, #0f0020, #3f0061);
  padding: 7rem 0 3rem;
  text-align: center;
}
.projects-hero h1 { color: #ffffff; font-size: 2.5rem; }
.projects-hero p { color: rgba(255,255,255,0.7); }
.search-bar-wrap { max-width: 500px; margin: 1.5rem auto 0; }
.search-bar-wrap .form-control {
  border-radius: 50px 0 0 50px !important;
  border-right: none;
  height: 48px;
  font-size: 0.9rem;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  padding-left: 1.25rem;
}
.search-bar-wrap .form-control::placeholder { color: rgba(255,255,255,0.5); }
.search-bar-wrap .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
  box-shadow: none;
}
.search-bar-wrap .btn-search {
  border-radius: 0 50px 50px 0 !important;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0 1.25rem;
  height: 48px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.search-bar-wrap .btn-search:hover { background: rgba(255,255,255,0.3); color: #fff; }
.tags-section { padding: 2rem 0 1rem; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1.5px solid rgba(63,0,97,0.3);
  color: var(--primary);
  background: transparent;
  margin: 4px;
}
.tag-pill:hover { background: rgba(63,0,97,0.07); color: var(--primary); }
.tag-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(63,0,97,0.3);
}
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(63,0,97,0.25);
}
.project-card-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-img { transform: scale(1.04); }
.project-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
}
.project-card-title:hover { color: var(--primary); }
.project-card-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.project-card-desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn-read-more {
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
}
.btn-code {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1.5px solid var(--dark);
}
.btn-code:hover { background: #333; color: #fff; }
.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(63,0,97,0.3);
}
.btn-view:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); }
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  border-radius: 8px;
  margin: 0 3px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.pagination .page-link:hover { background: var(--primary-faint); border-color: var(--primary); }
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ── CONTACT PAGE ─────────────────────────── */
.contact-hero {
  background: linear-gradient(145deg, #0f0020, #3f0061);
  padding: 7rem 0 3.5rem;
  text-align: center;
}
.contact-hero h1 { color: #ffffff; }
.contact-hero p { color: rgba(255,255,255,0.7); max-width: 520px; margin: 0 auto; }
.contact-section { padding: 4rem 0; }
.contact-info-card {
  background: var(--primary-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child { border-bottom: none; padding-bottom: 0; }
.contact-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 1.1rem;
}
.contact-info-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.contact-info-value { font-weight: 700; color: var(--dark); }
.contact-form-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.contact-form-card .form-control,
.contact-form-card .form-control:focus {
  border-color: var(--border);
  border-radius: 10px !important;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  transition: var(--transition);
}
.contact-form-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63,0,97,0.1);
}
.contact-form-card textarea { resize: vertical; min-height: 140px; }

/* ── ABOUT WORK PAGE ──────────────────────── */
.aboutwork-section { padding: 5rem 0; }
.work-table-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.work-table { margin: 0; }
.work-table thead th {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1rem 1.25rem;
  border: none;
  white-space: nowrap;
}
.work-table tbody tr {
  transition: var(--transition);
  border-color: rgba(63,0,97,0.06);
}
.work-table tbody tr:hover { background: var(--primary-faint); }
.work-table td {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  vertical-align: middle;
  white-space: nowrap;
  border-color: rgba(63,0,97,0.06);
}
.work-table .btn-view-detail {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 5px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.work-table .btn-view-detail:hover { background: var(--primary-light); transform: translateY(-1px); }
.work-table .btn-open-file {
  background: #f0f0f0;
  color: var(--dark);
  border: none;
  padding: 5px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.work-table .btn-open-file:hover { background: #e0e0e0; }

/* ── EDUCATION (LOGIN) PAGE ───────────────── */
.edu-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #0f0020, #3f0061);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 1rem 2rem;
}
.edu-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  width: 100%;
  max-width: 440px;
  text-align: center;
}
.edu-card img {
  width: 90px; height: 90px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 1.25rem;
}
.edu-card h2 { font-size: 1.4rem; color: var(--primary); margin-bottom: 0.25rem; }
.edu-card .subtitle { color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; }
.edu-card .form-control {
  border-color: var(--border);
  border-radius: 10px !important;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.edu-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63,0,97,0.1);
}

/* ── PROJECT DETAIL PAGE ──────────────────── */
.project-detail-hero {
  background: linear-gradient(145deg, #0f0020, #3f0061);
  padding: 7rem 0 2.5rem;
}
.project-detail-hero h1 { color: #ffffff; font-size: 2rem; }
.project-detail-section { padding: 3rem 0; }
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--primary-faint);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
}
.detail-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}
.detail-meta-item { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.detail-meta-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.detail-meta-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 3px; }
.detail-meta-value { font-weight: 700; color: var(--dark); }

/* ── SCROLL TO TOP ────────────────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(63,0,97,0.35);
  transition: var(--transition);
  z-index: 999;
  font-size: 0.9rem;
}
.scroll-to-top:hover { background: var(--primary-light); transform: translateY(-3px); }

/* ── DARK MODE TOGGLE ─────────────────────── */
.theme-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 900;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--primary-faint);
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.theme-toggle:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── ALERTS ───────────────────────────────── */
.custom-alert {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  width: 90%;
  max-width: 520px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0.95;
}
.close-alert {
  position: absolute;
  top: 6px;
  right: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #868484b1;
  cursor: pointer;
  background: none;
  border: none;
}
.close-alert:hover { color: #000; }

/* ── UTILITIES ─────────────────────────────── */
.bg-faint { background: var(--primary-faint); }
.text-primary-brand { color: var(--primary) !important; }

@media (max-width: 768px) {
  .hero-stats { gap: 1.2rem; }
  .hero-photo { width: 150px; height: 150px; }
  .newsletter-wrap { padding: 2rem 1.25rem; }
  .contact-form-card { padding: 1.5rem; }
  .edu-card { padding: 2rem 1.5rem; }
}
