/* ==========================================================================
   Abu Mercy - Portfolio Component Styles
   Theme: Obsidian Dark / Cyber Teal & Electric Cyan Accents
   Fully Mobile-Responsive & Touch-Optimized
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header & Navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(8, 11, 17, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: #ffffff;
  min-height: var(--touch-target-min);
}

.brand-logo .logo-bracket {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.8rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.mobile-toggle:hover,
.mobile-toggle:focus-visible {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   2. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.07);
  border: 1px solid rgba(0, 242, 254, 0.22);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-badge span.sparkle {
  color: var(--accent-amber);
}

.hero-title {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.hero-title .name-highlight {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 600;
  color: var(--accent-teal);
  margin-bottom: 1.25rem;
  font-family: var(--font-sans);
  line-height: 1.35;
}

.hero-hook {
  font-size: clamp(0.98rem, 2.2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Visual / Avatar Card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.avatar-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.avatar-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  background: var(--bg-card);
  aspect-ratio: 4 / 5;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition-slow);
}

.avatar-card:hover .avatar-img {
  transform: scale(1.03);
}

.avatar-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, rgba(129, 140, 248, 0.15) 40%, transparent 70%);
  filter: blur(25px);
  z-index: -1;
  border-radius: 50%;
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.08); opacity: 0.85; }
}

/* Floating Code Snippet on Hero */
.code-floating-card {
  position: absolute;
  bottom: -25px;
  right: -20px;
  width: 270px;
  background: rgba(14, 19, 31, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  z-index: 2;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
}

.code-dots {
  display: flex;
  gap: 5px;
}

.code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #10b981; }

.code-lang {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.code-line {
  color: var(--text-secondary);
  line-height: 1.4;
}

.code-line .kwd { color: #f43f5e; }
.code-line .str { color: #38bdf8; }
.code-line .fn { color: #a855f7; }
.code-line .bool { color: #10b981; }

/* --------------------------------------------------------------------------
   3. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-narrative {
  font-size: clamp(0.98rem, 2.5vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-narrative p {
  margin-bottom: 1.25rem;
}

.about-highlight-box {
  background: rgba(0, 242, 254, 0.03);
  border-left: 3px solid var(--accent-cyan);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pillar-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.pillar-card:hover {
  border-color: var(--border-accent);
  transform: translateX(6px);
  background: var(--bg-card-hover);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.pillar-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   4. Technical Skills Section
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}

.skill-category-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.skill-category-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.category-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.skills-pill-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.skill-pill:hover {
  color: #ffffff;
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   5. Experience Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan) 0%, rgba(129, 140, 248, 0.5) 70%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.75rem;
}

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

.timeline-marker {
  position: absolute;
  top: 24px;
  left: -2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
  z-index: 2;
}

.timeline-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.role-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.company-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.period-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-indigo);
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.25);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.location-tag {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.timeline-bullets {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 1.1rem;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   6. Projects Section
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

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

.project-card:hover {
  border-color: rgba(0, 242, 254, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.1);
  background: var(--bg-card-hover);
}

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

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.project-folder-icon {
  color: var(--accent-cyan);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-icon-link {
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 38px;
}

.project-icon-link:hover {
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-teal);
  margin-bottom: 1rem;
}

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

.project-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.project-features li {
  position: relative;
  padding-left: 1.2rem;
}

.project-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-emerald);
  font-size: 0.85rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.github-cta-banner {
  margin-top: 3rem;
  background: linear-gradient(135deg, rgba(14, 19, 31, 0.9) 0%, rgba(20, 27, 45, 0.9) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.github-cta-text h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.github-cta-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. Volunteering & Community Impact
   -------------------------------------------------------------------------- */
.volunteering-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  box-shadow: var(--shadow-md);
}

.volunteering-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.org-logo-badge {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: var(--radius-md);
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.org-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.org-role {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.volunteering-body {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.25rem;
}

.volunteering-body p {
  margin-bottom: 1rem;
}

/* Photo Gallery Grid */
.gallery-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #0f1422;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 11, 17, 0.9) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   8. Contact Section
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-method-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  gap: 1rem;
}

.contact-method-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.contact-method-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.08);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-method-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.contact-method-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-mono);
  word-break: break-word;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  min-height: 36px;
}

.copy-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
}

.contact-socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Contact Form */
.contact-form-panel {
  padding: 2.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(8, 11, 17, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 16px; /* Essential: prevents iOS Safari auto-zoom */
  transition: all var(--transition-fast);
  outline: none;
  min-height: 44px;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
  background: rgba(8, 11, 17, 0.9);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-back-top {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  min-height: var(--touch-target-min);
}

/* --------------------------------------------------------------------------
   10. Toast & Modal
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  max-width: 100%;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  transition: all var(--transition-fast);
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
  background: var(--accent-cyan);
  color: #000000;
}

/* --------------------------------------------------------------------------
   11. Comprehensive Responsive Media Queries
   -------------------------------------------------------------------------- */

/* Tablet & Smaller Desktops (< 992px) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-content {
    align-items: center;
  }
  .hero-hook {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Mobile Devices (< 768px) */
@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: rgba(8, 11, 17, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    flex-direction: column;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0.5rem;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
    z-index: 999;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: rgba(0, 242, 254, 0.08);
    color: var(--accent-cyan);
  }

  .nav-menu .nav-link::after {
    display: none;
  }

  /* Prevent floating code card from causing horizontal overflow */
  .code-floating-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 1.5rem auto 0;
    width: 100%;
    max-width: 300px;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-marker {
    left: -1.5rem;
    width: 14px;
    height: 14px;
  }

  .timeline-card {
    padding: 1.5rem;
  }

  .experience-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .experience-meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  .volunteering-card {
    padding: 1.75rem;
  }

  .contact-form-panel {
    padding: 1.75rem;
  }

  .github-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
}

/* Small Smart Phones (< 480px) */
@media (max-width: 480px) {
  .brand-logo {
    font-size: 1.12rem;
  }

  .status-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
  }

  .status-badge span:last-child {
    display: none;
  }

  .hero-section {
    padding-top: calc(var(--header-height) + 1.25rem);
    padding-bottom: 3.5rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    text-align: center;
  }

  .stat-item {
    align-items: center;
  }

  .avatar-wrapper {
    max-width: 280px;
  }

  .pillar-card {
    padding: 1.1rem;
    gap: 1rem;
  }

  .pillar-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .pillar-title {
    font-size: 1.02rem;
  }

  .skill-category-card {
    padding: 1.25rem;
  }

  .timeline {
    padding-left: 1.2rem;
  }

  .timeline::before {
    left: 5px;
  }

  .timeline-marker {
    left: -1.2rem;
    width: 12px;
    height: 12px;
    top: 20px;
  }

  .timeline-card {
    padding: 1.2rem;
  }

  .role-title {
    font-size: 1.1rem;
  }

  .project-card {
    padding: 1.35rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .github-cta-banner {
    padding: 1.25rem;
  }

  .github-cta-banner .btn {
    width: 100%;
  }

  .volunteering-card {
    padding: 1.25rem;
  }

  .volunteering-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .org-title {
    font-size: 1.25rem;
  }

  .contact-method-card {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-method-card .copy-btn {
    align-self: flex-end;
    margin-top: -1.5rem;
  }

  .contact-socials .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .contact-form-panel {
    padding: 1.25rem;
  }

  #btn-submit-message {
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
  }

  .toast-container {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
  }

  .modal-overlay {
    padding: 0.75rem;
  }
}
