/* ========================================
   SNG MOHAMED SHAHEEN - PORTFOLIO STYLES
   Dark Mode with Blue + Purple Neon
   ======================================== */

/* -- CSS Variables -- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f2a;
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3a;
  --text-primary: #e0e0ff;
  --text-secondary: #a0a0c0;
  --text-muted: #6a6a8a;
  --accent-blue: #00f0ff;
  --accent-purple: #a855f7;
  --accent-gradient: linear-gradient(135deg, #00f0ff, #a855f7);
  --border-color: rgba(0, 240, 255, 0.1);
  --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --navbar-bg: rgba(10, 10, 26, 0.9);
  --section-alt-bg: #0d0d25;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0ff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8a8aa0;
  --border-color: rgba(168, 85, 247, 0.15);
  --shadow-neon: 0 0 20px rgba(168, 85, 247, 0.1);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
  --navbar-bg: rgba(248, 249, 252, 0.92);
  --section-alt-bg: #f0f0f8;
}

/* -- Global Reset & Base -- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
  max-width: 100vw;
}

::selection {
  background: rgba(0, 240, 255, 0.3);
  color: var(--text-primary);
}

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

a:hover {
  color: var(--accent-purple);
}

.text-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -- Preloader -- */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 60px;
  height: 60px;
  position: relative;
}

.loader-inner {
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--accent-blue);
  border-right-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -- Particles -- */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* -- Navbar -- */
.navbar {
  padding: 15px 0;
  background: transparent;
  transition: var(--transition);
  z-index: 1000;
}

.navbar.scrolled {
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-neon);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary) !important;
  letter-spacing: 1px;
}

.brand-icon {
  color: var(--accent-blue);
}

.navbar-toggler {
  border: 2px solid var(--accent-blue);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  justify-content: center;
  align-items: center;
}

.toggler-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) {
  opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--accent-blue) !important;
  background: rgba(0, 240, 255, 0.05);
}

.theme-toggle-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--accent-blue);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  margin-left: 10px;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-blue);
  background: rgba(0, 240, 255, 0.1);
  transform: rotate(20deg);
}

/* -- Hero Section -- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
}

.hero-content {
  max-width: 800px;
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  min-height: 40px;
}

.typed-wrapper {
  color: var(--text-muted);
}

#typed-output {
  color: var(--accent-purple);
  font-weight: 600;
}

.typed-cursor {
  color: var(--accent-blue);
  font-weight: 300;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary-neon {
  background: var(--accent-gradient);
  color: #0a0a1a;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary-neon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: var(--transition);
}

.btn-primary-neon:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.4), 0 0 60px rgba(168, 85, 247, 0.2);
  color: #0a0a1a;
}

.btn-primary-neon:hover::before {
  opacity: 1;
}

.btn-outline-neon {
  background: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-outline-neon:hover {
  background: rgba(0, 240, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.2);
  color: var(--accent-blue);
}

.hero-social {
  display: flex;
  gap: 16px;
}

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

.hero-social a:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero-scroll-indicator a {
  color: var(--accent-blue);
  font-size: 1.5rem;
  opacity: 0.6;
  transition: var(--transition);
}

.hero-scroll-indicator a:hover {
  opacity: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* -- Sections -- */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

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

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

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-line {
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 4px;
  margin: 0 auto;
}

/* -- About Section -- */
.about-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.about-image-box {
  width: 300px;
  height: 300px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-avatar {
  font-size: 8rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.about-image-decoration {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 2px solid var(--accent-blue);
  border-radius: 20px;
  top: 10px;
  left: calc(50% - 150px);
  opacity: 0.2;
  z-index: -1;
}

.about-content {
  padding-left: 20px;
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.highlight-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

/* -- Skills Section -- */
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  transition: var(--transition);
}

.skill-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-neon);
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.skill-info i {
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

.skill-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-percent {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

[data-theme="light"] .skill-bar {
  background: rgba(0, 0, 0, 0.08);
}

.skill-progress {
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: var(--bar-color);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* -- Stats Section -- */
.stats-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-neon);
}

.stat-icon {
  font-size: 2.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  display: block;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 8px;
  font-weight: 500;
}

/* -- Projects Section -- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-accent);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover::before {
  opacity: 1;
}

.project-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(0, 240, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--card-accent);
  margin-bottom: 20px;
  transition: var(--transition);
}

.project-card:hover .project-icon {
  background: var(--card-accent);
  color: #0a0a1a;
  transform: scale(1.1);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tag {
  padding: 4px 12px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

.project-link {
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-link i {
  transition: var(--transition);
}

.project-link:hover i {
  transform: translateX(5px);
}

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

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-neon);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  transform: scale(1.15);
}

.service-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* -- Certifications Section -- */
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  transition: var(--transition);
  height: 100%;
  position: relative;
}

.cert-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--cert-color);
  border-radius: 3px;
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: var(--cert-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cert-card:hover::after {
  width: 60%;
}

.cert-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--cert-color);
  margin: 0 auto 20px;
  transition: var(--transition);
}

.cert-card:hover .cert-icon {
  background: var(--cert-color);
  color: #0a0a1a;
  transform: rotateY(180deg);
}

.cert-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cert-issuer {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.cert-date {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

/* -- Contact Section -- */
.contact-heading {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 1.05rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: var(--transition);
}

.contact-info-item:hover {
  border-color: var(--accent-blue);
  transform: translateX(5px);
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.contact-info-item a,
.contact-info-item span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* Contact Form */
.contact-form .form-control {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 16px 20px;
  transition: var(--transition);
}

.contact-form .form-control:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
  background: var(--bg-card);
  color: var(--text-primary);
}

.contact-form .form-floating label {
  color: var(--text-muted);
}

.contact-form .form-floating > .form-control:focus ~ label,
.contact-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--accent-blue);
}

/* -- Footer -- */
.footer {
  background: var(--bg-secondary);
  padding: 60px 0 0;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-color);
}

.footer-brand {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.footer-desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(0, 240, 255, 0.08);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-blue);
  padding-left: 5px;
}

.footer-divider {
  border-color: var(--border-color);
  margin: 40px 0 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

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

.powered-by .text-accent {
  font-weight: 700;
}

/* -- Back to Top -- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  color: #0a0a1a;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

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

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.5);
  color: #0a0a1a;
}

/* -- Error Page -- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 16px;
}

.error-message {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* -- Responsive -- */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 16px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
  }

  .about-content {
    padding-left: 0;
    margin-top: 30px;
  }

  .about-highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .error-code {
    font-size: 5rem;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding: 0 5px;
  }

  .hero-title {
    word-break: break-word;
  }

  .hero-title-glitch {
    font-size: 2rem;
  }

  .marquee-item {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .project-card,
  .service-card,
  .cert-card,
  .skill-card,
  .stat-card,
  .faq-item {
    margin-left: 0;
    margin-right: 0;
  }

  .about-image-box {
    width: 220px;
    height: 220px;
  }

  .about-image-decoration {
    width: 240px;
    height: 240px;
  }

  .timeline-content {
    padding: 18px;
  }

  .contact-form .form-control {
    font-size: 16px;
  }

  .error-code {
    font-size: 5rem;
  }

  .error-buttons {
    flex-direction: column;
    align-items: center;
  }

  .error-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .error-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .toast-container {
    right: 10px;
    left: 10px;
  }

  .toast-notification {
    min-width: auto;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 575px) {
  .contact-info-item {
    flex-direction: column;
    text-align: center;
  }

  .hero-greeting {
    font-size: 0.95rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .highlight-item {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .icon-animated {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .faq-question {
    font-size: 0.95rem;
    padding: 16px 18px;
  }

  .timeline-item {
    padding-left: 40px;
    padding-right: 10px;
  }
}

/* -- Animations -- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -- Scrollbar -- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* -- Lazy Loading -- */
img[data-src] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img.loaded {
  opacity: 1;
}

[data-lazy] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-lazy].lazy-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -- Glitch Effect -- */
.hero-title-glitch {
  position: relative;
  display: inline-block;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}

.hero-title-glitch::before,
.hero-title-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-glitch::before {
  animation: glitch-1 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.hero-title-glitch::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
}

@keyframes glitch-2 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(3px, -3px); }
  40% { transform: translate(3px, 3px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(-3px, 3px); }
}

@keyframes glitch-skew {
  0%, 100% { transform: skew(0deg); }
  30% { transform: skew(0.5deg); }
  50% { transform: skew(-0.3deg); }
  70% { transform: skew(0.4deg); }
}

/* -- Marquee / Skills Ticker -- */
.marquee-section {
  padding: 40px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  max-width: 100vw;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  margin: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.marquee-item i {
  font-size: 1.2rem;
}

.marquee-item:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-neon);
  transform: translateY(-3px);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -- Timeline / Experience -- */
.timeline {
  position: relative;
  padding: 20px 0;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 30px;
  width: 18px;
  height: 18px;
  background: var(--accent-gradient);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -9px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-neon);
  transform: translateY(-4px);
}

.timeline-date {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-company {
  color: var(--accent-purple);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.timeline-item:nth-child(odd) .timeline-tags {
  justify-content: flex-end;
}

.timeline-tag {
  padding: 3px 10px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

/* Timeline Mobile */
@media (max-width: 767px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 50px;
    padding-right: 20px;
  }

  .timeline-dot {
    left: 11px !important;
    right: auto !important;
  }

  .timeline-item:nth-child(odd) .timeline-tags {
    justify-content: flex-start;
  }
}

/* -- Animated Icon Boxes -- */
.icon-animated {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  animation: icon-float 3s ease-in-out infinite;
}

.icon-animated::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: var(--accent-gradient);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.icon-animated:hover::before {
  opacity: 1;
}

.icon-animated:hover {
  transform: translateY(-5px) rotate(5deg);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.3);
}

.icon-animated i {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition);
}

.icon-animated:hover i {
  transform: rotate(360deg);
  -webkit-text-fill-color: initial;
  color: #0a0a1a;
}

.icon-animated:nth-child(2n) {
  animation-delay: -1s;
}

.icon-animated:nth-child(3n) {
  animation-delay: -2s;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.highlight-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

/* -- Toast Notification -- */
.toast-container {
  position: fixed;
  top: 100px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 320px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #10b981;
}

.toast-notification.toast-error {
  border-left-color: #ef4444;
}

.toast-notification.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.hide {
  transform: translateX(120%);
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.toast-message {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}

.toast-close:hover {
  color: var(--text-primary);
}

@media (max-width: 575px) {
  .toast-container {
    right: 10px;
    left: 10px;
  }
  .toast-notification {
    min-width: auto;
  }
}

/* -- FAQ Section -- */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--accent-blue);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--accent-blue);
}

.faq-question i {
  font-size: 0.85rem;
  color: var(--accent-blue);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s;
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0;
}

/* -- Global Mobile Overflow Fix -- */
*, *::before, *::after {
  box-sizing: border-box;
}

.main, main, section, .hero-section, .stats-section, .marquee-section, .footer {
  overflow-x: hidden;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.form-control, .form-floating, textarea, input {
  max-width: 100%;
}
