/* 
 * main.css — Unified 2026 Design System
 * Focus: Dark Mode, Liquid Glass 2.0, Spatial Depth, Motion as Language
 */

@import url('../../vendor/fonts/fonts.css');

:root {
  /* Core Colors */
  --bg-dark: #050505;
  --bg-surface: #0a0a0a;
  --main-color: #00ff41; /* Hacker Green */
  --main-color-rgb: 0, 255, 65;
  --accent-purple: #ff003c; /* Red Team Accent */
  
  /* Text Colors */
  --text-primary: #e0e0e0;
  --text-secondary: #888888;
  
  /* Glassmorphism 2.0 (Liquid Glass) */
  --glass-bg: rgba(10, 10, 10, 0.85);
  --glass-border: rgba(0, 255, 65, 0.15);
  --glass-highlight: rgba(0, 255, 65, 0.1);
  
  /* Shadows & Depth */
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.8);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.9), 0 0 15px rgba(0, 255, 65, 0.15);
  
  /* Typography */
  --font-heading: 'Share Tech Mono', monospace;
  --font-body: 'Fira Mono', monospace;
  --font-mono: 'Share Tech Mono', monospace;
  
  /* Layout */
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--main-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #fff;
}

.text-accent {
  color: var(--main-color);
  text-shadow: 0 0 15px rgba(var(--main-color-rgb), 0.4);
}

/* ==========================================================================
   SPA Layout & Transitions
   ========================================================================== */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  margin-top: var(--nav-height);
  position: relative;
  z-index: 10;
}

#page-container {
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-exit {
  opacity: 0;
  transform: translateY(10px);
}

.page-enter {
  animation: pageEnter 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--main-color), var(--accent-purple));
  z-index: 1050;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(var(--main-color-rgb), 0.5);
}

/* ==========================================================================
   Glassmorphism 2.0 (Liquid Glass Cards)
   ========================================================================== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

/* Glowing top border indicator expanding on hover */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--main-color), var(--accent-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--main-color-rgb), 0.15);
  border-color: rgba(var(--main-color-rgb), 0.35);
}

.glass-card:hover::before {
  left: 150%;
}

.glass-card:hover::after {
  transform: scaleX(1);
}

/* ==========================================================================
   Scroll Animations (Motion as Language)
   ========================================================================== */
.anim-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.25s; }
.delay-3 { transition-delay: 0.4s; }

/* Staggered list items — restores the original 3D-like scale & slide reveal */
.anim-item {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.anim-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   Canvas & Terminal Background
   ========================================================================== */
#network-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, #020d04 0%, #000401 65%, #000000 100%);
  will-change: transform;
}

/* Subtle CRT Monitor Scanline Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.08) 50%), linear-gradient(90deg, rgba(0, 255, 65, 0.01), rgba(0, 255, 65, 0.005), rgba(0, 255, 65, 0.01));
  background-size: 100% 4px, 6px 100%;
  z-index: 1;
  pointer-events: none;
}



/* ==========================================================================
   Typography & Shared Layout
   ========================================================================== */
.section {
  padding: 6rem 0;
  position: relative;
  z-index: 10;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff, var(--main-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--main-color-rgb), 0.1);
  color: var(--main-color);
  border: 1px solid var(--main-color);
  padding: 12px 28px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(var(--main-color-rgb), 0.2);
}

.btn-primary-custom:hover {
  background: var(--main-color);
  color: #000;
  box-shadow: 0 0 20px rgba(var(--main-color-rgb), 0.6);
  transform: translateY(-2px);
}

/* ==========================================================================
   Navigation (navbar.js)
   ========================================================================== */
#main-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
}

#main-navbar.scrolled {
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link {
  font-family: var(--font-heading);
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem !important;
  margin: 0 0.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active-nav-link {
  color: var(--main-color) !important;
  background: rgba(var(--main-color-rgb), 0.1);
}

/* Mobile Nav Toggle */
.navbar-toggler {
  border-color: rgba(255,255,255,0.1);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
  #navbarNavDropdown {
    background: rgba(15, 15, 18, 0.95);
    backdrop-filter: blur(20px);
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1rem;
  color: var(--main-color);
}

.glitch-effect {
  position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
}

.glitch-effect::before {
  left: 2px;
  text-shadow: -2px 0 red;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-effect::after {
  left: -2px;
  text-shadow: -2px 0 blue;
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); }
  20% { clip-path: inset(60% 0 10% 0); }
  40% { clip-path: inset(40% 0 50% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  80% { clip-path: inset(10% 0 70% 0); }
  100% { clip-path: inset(30% 0 20% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); }
  20% { clip-path: inset(30% 0 20% 0); }
  40% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(20% 0 50% 0); }
  80% { clip-path: inset(50% 0 30% 0); }
  100% { clip-path: inset(5% 0 80% 0); }
}

.cursor {
  animation: blink 1s step-end infinite;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.typewriter-text {
  color: var(--main-color);
  font-family: var(--font-mono);
}

@keyframes blink { 50% { opacity: 0; } }

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: justify;
  margin-bottom: 3rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icons a:hover {
  background: var(--main-color);
  color: #000;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(var(--main-color-rgb), 0.4);
}

/* ==========================================================================
   Education Grid
   ========================================================================== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.education-card {
  display: flex;
  flex-direction: column;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--main-color);
}

.education-level {
  background: rgba(var(--main-color-rgb), 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(var(--main-color-rgb), 0.3);
}

.education-institution {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.education-degree {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.education-period {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.education-achievements {
  list-style: none;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.education-achievements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.education-achievements li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--main-color);
}

.education-card:hover .education-achievements li {
  animation: slideInLeft 0.3s ease forwards;
}

.education-card:hover .education-achievements li:nth-child(1) { animation-delay: 0.05s; }
.education-card:hover .education-achievements li:nth-child(2) { animation-delay: 0.1s; }
.education-card:hover .education-achievements li:nth-child(3) { animation-delay: 0.15s; }

@keyframes slideInLeft {
  from {
    opacity: 0.7;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.gpa-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(157,78,221,0.2), rgba(0,255,238,0.1));
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.05);
  margin-top: auto;
}

.gpa-icon { color: #ffbd2e; }

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

.timeline-items::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--main-color), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 50%;
  padding-right: 40px;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding-right: 0;
  padding-left: 40px;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  right: -8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 3px solid var(--main-color);
  z-index: 2;
  box-shadow: 0 0 10px rgba(var(--main-color-rgb), 0.5);
}

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

.timeline-date {
  position: absolute;
  top: 15px;
  right: -180px;
  width: 150px;
  color: var(--main-color);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-item:nth-child(even) .timeline-date {
  left: -180px;
  right: auto;
  text-align: right;
}

.timeline-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .timeline-items::before { left: 20px; }
  .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; }
  .timeline-item:nth-child(even) { margin-left: 0; }
  .timeline-dot { left: 12px; right: auto; }
  .timeline-item:nth-child(even) .timeline-dot { left: 12px; }
  .timeline-date { position: relative; top: auto; right: auto; left: auto; text-align: left !important; margin-bottom: 10px; display: block; }
  .timeline-item:nth-child(even) .timeline-date { left: auto; }
}

/* ==========================================================================
   Animated Stats / Highlights Counter
   ========================================================================== */
.stats-section {
  padding: 4rem 0;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--main-color), var(--accent-purple));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 2px;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--main-color-rgb), 0.15);
  border-color: rgba(var(--main-color-rgb), 0.35);
}

.stat-card:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  display: block;
  filter: drop-shadow(0 0 6px rgba(var(--main-color-rgb), 0.4));
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--main-color);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(var(--main-color-rgb), 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.stat-suffix {
  font-size: 0.6em;
  color: var(--accent-purple);
  font-weight: 700;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   Skills Grid
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category-title {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--main-color);
  font-family: var(--font-mono);
}

.skill-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.8rem 0.4rem;
  width: 100%;
  cursor: pointer;
}

.skill-icon-item:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: rgba(var(--main-color-rgb), 0.25);
  background: rgba(var(--main-color-rgb), 0.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.skill-icon-item img {
  width: 40px; height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
  transition: transform 0.3s ease;
}

.skill-icon-item:hover img {
  transform: scale(1.1);
}

.skill-icon-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  transition: color 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.skill-icon-item:hover .skill-icon-name {
  color: var(--main-color);
}

/* Stagger animation on card hover */
.skill-category-card:hover .skill-icon-item {
  animation: skillIconFloat 0.4s ease forwards;
}

.skill-category-card:hover .skill-icon-item:nth-child(1) { animation-delay: 0.04s; }
.skill-category-card:hover .skill-icon-item:nth-child(2) { animation-delay: 0.08s; }
.skill-category-card:hover .skill-icon-item:nth-child(3) { animation-delay: 0.12s; }
.skill-category-card:hover .skill-icon-item:nth-child(4) { animation-delay: 0.16s; }
.skill-category-card:hover .skill-icon-item:nth-child(5) { animation-delay: 0.2s; }
.skill-category-card:hover .skill-icon-item:nth-child(6) { animation-delay: 0.24s; }
.skill-category-card:hover .skill-icon-item:nth-child(7) { animation-delay: 0.28s; }
.skill-category-card:hover .skill-icon-item:nth-child(8) { animation-delay: 0.32s; }
.skill-category-card:hover .skill-icon-item:nth-child(9) { animation-delay: 0.36s; }
.skill-category-card:hover .skill-icon-item:nth-child(10) { animation-delay: 0.4s; }
.skill-category-card:hover .skill-icon-item:nth-child(11) { animation-delay: 0.44s; }
.skill-category-card:hover .skill-icon-item:nth-child(12) { animation-delay: 0.48s; }

@keyframes skillIconFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* ==========================================================================
   Projects Grid
   ========================================================================== */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-heading);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(var(--main-color-rgb), 0.15);
  border-color: var(--main-color);
  color: var(--main-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.project-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hover-image {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}

.project-card:hover .default-image { opacity: 0; }
.project-card:hover .hover-image { opacity: 1; transform: scale(1.05); }

.project-category {
  position: absolute;
  top: 15px; right: 15px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--main-color);
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title { font-size: 1.4rem; margin-bottom: 0.5rem; }
.project-description { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.tech-item {
  font-size: 0.8rem;
  color: var(--accent-purple);
  background: rgba(157,78,221,0.1);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Certificates Grid
   ========================================================================== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.certificates-extra-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, margin-top 0.5s ease;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
}

.certificates-extra-wrapper.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 2rem;
}

.certificates-extra-inner {
  min-height: 0;
}

.certificate-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.certificate-card img {
  width: 100%;
  height: clamp(140px, 22vw, 220px);
  object-fit: contain;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  padding: 10px;
}

.certificate-card h5 { margin-bottom: 1rem; color: #fff; }
.certificate-card .badge-info { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; flex-grow: 1; }

.btn-outline-custom {
  color: var(--main-color);
  border: 1px solid var(--main-color);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-outline-custom:hover {
  background: rgba(var(--main-color-rgb), 0.1);
  color: #fff;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--main-color);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: 0 0 10px rgba(var(--main-color-rgb), 0.2);
}

.success-message { color: #00ff88; margin-top: 1rem; background: rgba(0,255,136,0.1); padding: 10px; border-radius: 8px; }
.error-message { color: #ff5f56; margin-top: 1rem; background: rgba(255,95,86,0.1); padding: 10px; border-radius: 8px; }

/* ==========================================================================
   Footer
   ========================================================================== */
#main-footer {
  background: #050505;
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-links {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer_click {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer_click:hover {
  color: var(--main-color);
}

/* ==========================================================================
   Loading Screen
   ========================================================================== */
#loading-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loading-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  text-align: center;
}

.loader-text {
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--main-color);
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  letter-spacing: 4px;
  animation: pulse 1.8s infinite ease-in-out;
  text-shadow: 0 0 15px rgba(var(--main-color-rgb), 0.6);
}

.loader-bar {
  width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  border: 1px solid rgba(var(--main-color-rgb), 0.1);
}

.loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--main-color), var(--accent-purple));
  animation: loading 1.8s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes loading {
  0% { left: -100%; }
  50% { left: 0%; }
  100% { left: 100%; }
}

/* Active Button Feedback Animations */
.btn-primary-custom:active,
.btn-outline-custom:active,
.filter-btn:active,
.social-icons a:active,
.nav-link:active,
.submit-btn:active,
.details-button:active,
.footer_click:active,
#more-certs-btn:active,
#less-certs-btn:active {
  transform: scale(0.94) !important;
  transition: transform 0.08s ease-in-out !important;
}

/* ==========================================================================
   Cyber AI Chatbot Widget (SEC-BOT v1.0)
   ========================================================================== */
#cyber-chatbot-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
  font-family: var(--font-body);
}

.chatbot-circle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #050505;
  border: 2px solid var(--main-color);
  color: var(--main-color);
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(var(--main-color-rgb), 0.35);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  position: absolute;
  bottom: 0;
  right: 0;
}

.chatbot-circle-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 0 25px rgba(var(--main-color-rgb), 0.6);
}

.chatbot-circle-btn:active {
  transform: scale(0.92);
}

.pulse-indicator {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--main-color);
  box-shadow: 0 0 8px var(--main-color);
  animation: botPulse 1.5s infinite;
}

@keyframes botPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

#chatbot-window {
  width: 360px;
  height: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: bottom right;
  position: absolute;
  bottom: 0;
  right: 0;
}

.chatbot-collapsed {
  opacity: 0;
  transform: scale(0.5) translateY(100px);
  pointer-events: none;
}

#chatbot-popup-bubble {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 220px;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--main-color);
  border-radius: 12px;
  padding: 10px 28px 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  box-shadow: 0 0 15px rgba(var(--main-color-rgb), 0.25);
  cursor: pointer;
  z-index: 10005;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

#chatbot-popup-bubble.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.popup-bubble-close {
  position: absolute;
  top: 4px;
  right: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.popup-bubble-close:hover {
  color: var(--main-color);
}

.chatbot-header {
  padding: 12px 16px;
  background: rgba(var(--main-color-rgb), 0.08);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--main-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.terminal-prompt {
  color: var(--accent-purple);
}

.online-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  display: inline-block;
}

.chatbot-actions button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.3s;
}

.chatbot-actions button:hover {
  color: #fff;
}

#chatbot-settings {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(var(--main-color-rgb), 0.2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

#chatbot-settings label {
  color: var(--main-color);
  margin-bottom: 6px;
  display: block;
}

#chatbot-settings input {
  flex-grow: 1;
  background: #050505;
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

#chatbot-settings input:focus {
  outline: none;
  border-color: var(--main-color);
}

#chatbot-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom Scrollbar for Terminal Chat */
#chatbot-body::-webkit-scrollbar {
  width: 4px;
}
#chatbot-body::-webkit-scrollbar-thumb {
  background: rgba(var(--main-color-rgb), 0.25);
  border-radius: 2px;
}

.chatbot-msg {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
}

.msg-sender {
  font-weight: 700;
  margin-right: 6px;
}

.msg-user .msg-sender {
  color: #00e5ff;
}

.msg-user .msg-text {
  color: #fff;
}

.msg-bot .msg-sender {
  color: var(--main-color);
}

.msg-bot .msg-text {
  color: #c0c0c0;
}

.msg-sys {
  color: #ffbd2e;
  font-style: italic;
}

.msg-typing {
  color: #666;
}

.typing-blink {
  animation: typingBlink 1.2s infinite step-start;
}

@keyframes typingBlink {
  50% { opacity: 0.4; }
}

.chatbot-input-area {
  padding: 12px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
}

.chatbot-input-area input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: border-color 0.3s;
}

.chatbot-input-area input:focus {
  outline: none;
  border-color: var(--main-color);
}

#chatbot-send-btn {
  background: rgba(var(--main-color-rgb), 0.1);
  border: 1px solid var(--main-color);
  color: var(--main-color);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

#chatbot-send-btn:hover {
  background: var(--main-color);
  color: #000;
}

@media (max-width: 576px) {
  #cyber-chatbot-widget {
    bottom: 15px;
    right: 15px;
  }
  #chatbot-window {
    width: calc(100vw - 30px);
    height: 380px;
    bottom: 70px;
    right: -15px;
  }
  .chatbot-circle-btn {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }
  #chatbot-popup-bubble {
    width: 190px;
    font-size: 0.7rem;
    bottom: 65px;
  }
}

/* ==========================================================================
   Interactive VAPT Scanner Overlay
   ========================================================================== */
#vapt-scanner-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(2, 6, 3, 0.85);
  z-index: 15000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scanner-window {
  width: 90%;
  max-width: 750px;
  height: 500px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(var(--main-color-rgb), 0.3);
  box-shadow: 0 0 30px rgba(var(--main-color-rgb), 0.25);
  animation: modalScale 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: #020603;
  border-radius: 12px;
  overflow: hidden;
}

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

.scanner-header {
  padding: 12px 20px;
  background: rgba(var(--main-color-rgb), 0.05);
  border-bottom: 1px solid rgba(var(--main-color-rgb), 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scanner-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--main-color);
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#scanner-close-btn {
  background: transparent;
  border: none;
  color: var(--accent-purple);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

#scanner-close-btn:hover {
  transform: scale(1.2);
}

.scanner-console {
  flex-grow: 1;
  background: #020603;
  padding: 20px;
  overflow-y: auto;
  border-bottom: 1px solid rgba(var(--main-color-rgb), 0.15);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#scanner-log-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* Custom Scrollbar for Scanner console */
.scanner-console::-webkit-scrollbar {
  width: 5px;
}
.scanner-console::-webkit-scrollbar-thumb {
  background: rgba(var(--main-color-rgb), 0.3);
  border-radius: 2px;
}

.console-log-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.4;
  color: #a0c0a0;
  white-space: pre-wrap;
  word-break: break-all;
}

.scanner-progress-container {
  padding: 16px 20px;
  background: #010402;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scanner-progress-bar {
  height: 4px;
  width: 0%;
  background-color: var(--accent-purple);
  transition: width 0.1s ease-out, background-color 0.4s ease;
  box-shadow: 0 0 8px rgba(255, 0, 60, 0.4);
}

.scanner-status-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-purple);
  letter-spacing: 1px;
}

/* Interactive Terminal CLI Input & Helper elements */
.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--main-color);
  white-space: nowrap;
}

#terminal-input {
  flex-grow: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #fff !important;
  font-family: var(--font-mono) !important;
  font-size: 0.85rem !important;
  caret-color: var(--main-color) !important;
}

.terminal-help-table {
  margin: 8px 0;
  border-collapse: collapse;
}

.terminal-help-table td {
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: none;
}

.terminal-help-cmd {
  color: var(--main-color);
  font-weight: bold;
  padding-right: 20px !important;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.terminal-help-cmd:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--main-color);
}

.terminal-help-desc {
  color: #a0c0a0;
}

.terminal-item-title {
  color: #fff;
  font-weight: bold;
  margin-top: 6px;
}

.terminal-item-detail {
  color: #88c888;
  margin-left: 15px;
  font-style: italic;
}

/* ==========================================================================
   Certificate Image Lightbox Modal
   ========================================================================== */
.cert-image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 3, 0.95);
  z-index: 20000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cert-image-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.cert-modal-content {
  max-width: 90%;
  max-height: 85%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-image-modal.show .cert-modal-content {
  transform: scale(1);
}

.cert-modal-content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
  border-radius: 8px;
  box-shadow: 0 0 35px rgba(var(--main-color-rgb), 0.35);
  border: 1px solid rgba(var(--main-color-rgb), 0.25);
  display: block;
}

.cert-modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
}

.cert-modal-close:hover {
  color: var(--main-color);
  transform: scale(1.1);
}

.cert-modal-caption {
  color: #fff;
  text-align: center;
  margin-top: 15px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ==========================================================================
   Custom 404 Page (Error Page)
   ========================================================================== */
.error-404-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 150px);
  padding: 4rem 0;
}

.error-console {
  max-width: 650px;
  width: 100%;
  border: 1px solid rgba(255, 0, 60, 0.3) !important;
  box-shadow: 0 0 35px rgba(255, 0, 60, 0.15), inset 0 0 15px rgba(255, 0, 60, 0.05) !important;
  position: relative;
  overflow: hidden;
  background: #020403 !important;
  border-radius: 12px;
}

.error-console::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
}

.error-badge {
  font-size: 4rem;
  color: var(--accent-purple);
  animation: error-pulse 2s infinite ease-in-out;
}

@keyframes error-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 0, 60, 0.6)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(255, 0, 60, 0.9)); }
}

.error-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  margin-bottom: 0.5rem;
  position: relative;
  text-shadow: 0.05em 0 0 rgba(255, 0, 60, 0.75),
              -0.025em -0.05em 0 rgba(0, 255, 65, 0.75),
              0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
  animation: glitch-anim 1s infinite;
}

@keyframes glitch-anim {
  0% {
    text-shadow: 1px 0 0 rgba(255, 0, 60, 0.75), -1px -2px 0 rgba(0, 255, 65, 0.75), 0 1px 0 rgba(0, 0, 255, 0.75);
  }
  14% {
    text-shadow: 1px 0 0 rgba(255, 0, 60, 0.75), -1px -2px 0 rgba(0, 255, 65, 0.75), 0 1px 0 rgba(0, 0, 255, 0.75);
  }
  15% {
    text-shadow: -2px -1px 0 rgba(255, 0, 60, 0.75), 2px 1px 0 rgba(0, 255, 65, 0.75), -1px 2px 0 rgba(0, 0, 255, 0.75);
  }
  49% {
    text-shadow: -2px -1px 0 rgba(255, 0, 60, 0.75), 2px 1px 0 rgba(0, 255, 65, 0.75), -1px 2px 0 rgba(0, 0, 255, 0.75);
  }
  50% {
    text-shadow: 3px 2px 0 rgba(255, 0, 60, 0.75), -3px -1px 0 rgba(0, 255, 65, 0.75), 2px -2px 0 rgba(0, 0, 255, 0.75);
  }
  99% {
    text-shadow: 3px 2px 0 rgba(255, 0, 60, 0.75), -3px -1px 0 rgba(0, 255, 65, 0.75), 2px -2px 0 rgba(0, 0, 255, 0.75);
  }
  100% {
    text-shadow: -1px 0 0 rgba(255, 0, 60, 0.75), -1px -1px 0 rgba(0, 255, 65, 0.75), 0 -2px 0 rgba(0, 0, 255, 0.75);
  }
}

.error-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  font-family: var(--font-heading);
  letter-spacing: 1.5px;
}

.terminal-box {
  background: #010402;
  border: 1px solid rgba(var(--main-color-rgb), 0.15);
  border-radius: 6px;
  overflow: hidden;
}

.terminal-header {
  background: rgba(var(--main-color-rgb), 0.05);
  border-bottom: 1px solid rgba(var(--main-color-rgb), 0.15);
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-header .dot.red { background: var(--accent-purple); }
.terminal-header .dot.yellow { background: #ffbd2e; }
.terminal-header .dot.green { background: var(--main-color); }

.terminal-title-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-left: 8px;
}

.terminal-body {
  padding: 15px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.terminal-body .log-line {
  margin-bottom: 6px;
}

.terminal-body .cursor-line {
  color: var(--main-color);
  animation: cursor-blink 1s infinite step-end;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid var(--main-color);
  color: var(--main-color);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 15px rgba(var(--main-color-rgb), 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.back-to-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: var(--main-color);
  color: #000;
  box-shadow: 0 0 25px rgba(var(--main-color-rgb), 0.7);
  transform: translateY(-5px) scale(1.05);
}

.back-to-top-btn:active {
  transform: translateY(-2px) scale(0.95);
}

/* ==========================================================================
   Comprehensive Responsive Rules
   (Placed last to ensure overrides work correctly via CSS cascade)
   ========================================================================== */

/* --- Tablet Landscape (≤ 1200px) --- */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
  .hero-content {
    max-width: 750px;
  }
}

/* --- Tablet Portrait (≤ 992px) --- */
@media (max-width: 992px) {
  :root {
    --nav-height: 70px;
  }
  .section {
    padding: 4rem 0;
  }
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .education-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
  }
  .education-institution {
    font-size: 1.2rem;
  }
  .education-degree {
    font-size: 1rem;
  }
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  .certificates-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  .scanner-window {
    width: 95%;
    height: 450px;
  }
}

/* --- Mobile Landscape / Small Tablet (≤ 768px) --- */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  .section-title {
    font-size: 1.7rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
  }
  .container {
    padding: 0 16px;
  }
  .glass-card {
    padding: 1.5rem;
    border-radius: 12px;
  }
  .glass-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  .hero-section {
    min-height: auto;
    padding: 3rem 0 2rem;
  }
  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: left;
  }
  .social-icons {
    gap: 1rem;
  }
  .social-icons a {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
  .btn-primary-custom {
    padding: 10px 22px;
    font-size: 0.85rem;
  }
  .education-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .skill-icons {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 1rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-image {
    height: 180px;
  }
  .certificates-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
  }
  .certificate-card img {
    height: clamp(120px, 28vw, 180px);
  }
  .cert-modal-content {
    max-width: 95%;
    max-height: 80%;
  }
  .cert-modal-content img {
    max-height: 65vh;
  }
  .cert-modal-close {
    top: -35px;
    font-size: 1.8rem;
  }
  .cert-modal-caption {
    font-size: 0.95rem;
  }
  .scanner-window {
    width: 95%;
    height: 400px;
  }
  .scanner-header {
    padding: 10px 16px;
  }
  .scanner-title {
    font-size: 0.95rem;
  }
  .scanner-console {
    padding: 14px;
  }
  .console-log-line {
    font-size: 0.8rem;
  }
  #main-footer {
    padding: 2rem 0;
  }
  .footer-links {
    gap: 1rem;
  }
  .footer_click {
    font-size: 0.8rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .stat-card {
    padding: 1.5rem 1rem;
  }
  .stat-number {
    font-size: clamp(2rem, 6vw, 2.8rem);
  }
  .stat-label {
    font-size: 0.78rem;
  }
  .stats-section {
    padding: 3rem 0;
  }
  .back-to-top-btn {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    bottom: 20px;
    left: 20px;
  }
  .error-title {
    font-size: 2.2rem;
  }
  .error-subtitle {
    font-size: 1.1rem;
  }
  .error-console {
    padding: 2.5rem !important;
  }
}

/* --- Mobile Portrait (≤ 576px) --- */
@media (max-width: 576px) {
  .section {
    padding: 2.5rem 0;
  }
  .section-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
  }
  .container {
    padding: 0 12px;
  }
  .glass-card {
    padding: 1.2rem;
    border-radius: 10px;
  }
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }
  .hero-subtitle {
    font-size: clamp(0.9rem, 3.5vw, 1.3rem);
    margin-bottom: 1.5rem;
  }
  .hero-description {
    font-size: 0.85rem;
    padding: 1rem !important;
    margin-bottom: 1.5rem;
  }
  .social-icons a {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .btn-primary-custom {
    padding: 9px 18px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
  }
  .education-institution {
    font-size: 1.1rem;
  }
  .education-degree {
    font-size: 0.9rem;
  }
  .education-achievements li {
    font-size: 0.85rem;
  }
  .skill-icon-item {
    padding: 0.6rem 0.3rem;
  }
  .skill-icon-item img {
    width: 32px;
    height: 32px;
  }
  .skill-icon-name {
    font-size: 0.7rem;
  }
  .skill-category-title {
    font-size: 1rem;
  }
  .timeline-content h3 {
    font-size: 1rem;
  }
  .timeline-content p {
    font-size: 0.85rem;
  }
  .timeline-logo {
    width: 32px;
    height: 32px;
  }
  .project-title {
    font-size: 1.2rem;
  }
  .project-description {
    font-size: 0.85rem;
  }
  .project-image {
    height: 160px;
  }
  .certificates-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
  }
  .certificate-card img {
    height: clamp(100px, 30vw, 150px);
    padding: 6px;
  }
  .certificate-card h5 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  .certificate-card .badge-info {
    font-size: 0.78rem;
    margin-bottom: 1rem;
  }
  .btn-outline-custom {
    font-size: 0.78rem;
    padding: 5px 12px;
  }
  .filter-buttons {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }
  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
  .contact-container {
    max-width: 100%;
  }
  .form-group input,
  .form-group textarea {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  .loader-text {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }
  .loader-bar {
    width: 140px;
  }
  .scanner-window {
    width: 96%;
    height: 360px;
  }
  .scanner-title {
    font-size: 0.85rem;
    gap: 6px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .stat-card {
    padding: 1.2rem 0.8rem;
  }
  .stat-icon {
    font-size: 1.5rem;
  }
  .stat-number {
    font-size: 2rem;
  }
  .stat-label {
    font-size: 0.72rem;
  }
  .stats-section {
    padding: 2rem 0;
  }
  .back-to-top-btn {
    bottom: 15px;
    left: 15px;
  }
  .error-title {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }
  .error-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .error-console {
    padding: 1.5rem !important;
  }
  .error-badge {
    font-size: 3rem;
  }
}

/* --- Very Small Screens (≤ 400px) --- */
@media (max-width: 400px) {
  .section-title {
    font-size: 1.2rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
  }
  .certificates-grid {
    grid-template-columns: 1fr;
  }
  .certificate-card img {
    height: 140px;
  }
  .education-grid {
    gap: 1rem;
  }
  .glass-card {
    padding: 1rem;
  }
  .skill-icons {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  .chatbot-title {
    font-size: 0.9rem;
  }
  .chatbot-msg {
    font-size: 0.78rem;
  }
  .error-title {
    font-size: 1.5rem;
  }
}


/* ==========================================================================
   Accessibility — respect reduced-motion preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-fade-up, .anim-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Recruiter CTA — availability strip, navbar CV pill, footer availability
   ========================================================================== */
.hero-availability {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.5rem 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-secondary, #b0b0b0);
}
.hero-availability .bx-map { color: var(--main-color); }
.hero-availability .avail-sep { opacity: 0.5; }
.avail-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--main-color);
  box-shadow: 0 0 8px var(--main-color);
  margin-right: 4px;
  vertical-align: middle;
  animation: availPulse 2s ease-in-out infinite;
}
@keyframes availPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.btn-cv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 1.25rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--main-color);
  border-radius: 999px;
  color: var(--main-color);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.btn-cv-pill:hover {
  background: var(--main-color);
  color: #000;
}
@media (max-width: 991px) {
  .btn-cv-pill { margin: 0.75rem 0 0; }
}

.footer-availability {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary, #b0b0b0);
  margin: 0.5rem 0;
}
.footer-availability .bx-map { color: var(--main-color); }

/* ==========================================================================
   Contact fast-lane — direct-channel cards above the form
   ========================================================================== */
.contact-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  color: var(--text-secondary, #b0b0b0);
  line-height: 1.7;
}
.contact-fastlane {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}
.contact-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 140px;
  padding: 1.25rem 0.75rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary, #f0f0f0);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.contact-channel i {
  font-size: 1.9rem;
  color: var(--main-color);
}
.contact-channel span {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.contact-channel:hover {
  transform: translateY(-4px);
  border-color: var(--main-color);
  color: var(--main-color);
}
.contact-channel:hover i { color: var(--main-color); }
@media (max-width: 520px) {
  .contact-channel { width: 44%; }
}

/* ==========================================================================
   Curated certificate wall — featured tier, issuer, dates, status pills
   ========================================================================== */
.cert-view-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 8px;
}
.cert-view-btn:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 3px;
}

.cert-featured {
  border-color: var(--main-color);
  box-shadow: 0 0 0 1px var(--main-color), 0 8px 30px rgba(0, 255, 65, 0.12);
}
.cert-featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #000;
  background: var(--main-color);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.cert-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.25rem;
}
.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--main-color);
  opacity: 0.9;
}
.cert-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.cert-pill-active {
  color: var(--main-color);
  border-color: var(--main-color);
}
.cert-pill-expired {
  color: #ff6b6b;
  border-color: #ff6b6b;
  opacity: 0.85;
}
.cert-dates {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary, #9a9a9a);
  margin-bottom: 0.5rem;
}
