:root {
  --bg-color: #0a0a0a;
  --bg-surface: #121212;
  --bg-surface-hover: #1a1a1a;
  --text-main: #f8f9fa;
  --text-muted: #9ca3af;
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.5);
  --accent-blue: #3b82f6;
  --border-color: #27272a;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}
html {
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .display-4, .display-6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.text-secondary {
  color: var(--text-muted) !important;
}

/* Navbar */
.portfolio-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  background-color: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.75rem 2rem;
  z-index: 1030;
}

.portfolio-nav .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
}

.portfolio-nav .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
}

.portfolio-nav .nav-link:hover, .portfolio-nav .nav-link.active {
  color: var(--text-main);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-surface-hover);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* Layout Spacing to accommodate floating navbar */
.hero-section {
  padding-top: 10rem;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

/* Background Glow Effects */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, rgba(10,10,10,0) 70%);
  border-radius: 50%;
  z-index: -1;
  top: -100px;
  left: -200px;
  pointer-events: none;
}

/* Hero Section */
.hero-headline-massive {
  font-size: clamp(2.2rem, 8vw, 6.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-sans);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.hero-subtitle-bar::before {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--accent-cyan);
}

.hero-image-wrapper {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(6, 182, 212, 0.2);
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 32px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image-wrapper:hover img {
  transform: scale(1.05);
}

/* Section Blocks */
.section-block {
  padding: 5rem 0;
}

.bg-light-subtle {
  background-color: var(--bg-surface) !important;
}

/* Cards (Skills, Projects, Services, Testimonials, Contact) */
.skill-card, .timeline-card, .service-card, .testimonial-card, .project-card, .contact-card {
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.skill-card:hover, .timeline-card:hover, .service-card:hover, .testimonial-card:hover, .project-card:hover, .contact-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.5);
  background-color: rgba(26, 26, 26, 0.7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.15);
}

/* Skill Filter Pills & Compact Cards */
.skill-filter-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
}

.skill-filter-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: #52525b;
}

.skill-filter-btn.active {
  background-color: var(--accent-cyan);
  color: #09090b;
  border-color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.35);
}

.skill-card-compact {
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  position: relative;
}

.skill-card-compact:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.6);
  background-color: rgba(26, 26, 26, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(6, 182, 212, 0.2);
}

.skill-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: transform 0.25s ease, background 0.25s ease;
}

.skill-card-compact:hover .skill-icon-box {
  background: rgba(6, 182, 212, 0.2);
  transform: scale(1.08);
}

.skill-category-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.skill-progress-slim {
  height: 5px !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

.skill-progress-slim .progress-bar {
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%) !important;
  border-radius: 10px !important;
  transition: width 0.6s ease;
}

.skill-prof-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

.project-card .project-thumb img {
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.project-placeholder {
  background-color: var(--bg-surface-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-color);
  border: 2px solid var(--accent-cyan);
}

/* Forms */
.form-control {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.form-control:focus {
  background-color: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  color: var(--text-main);
  box-shadow: 0 0 0 0.25rem rgba(6, 182, 212, 0.25);
}

/* Buttons */
.btn-dark {
  background-color: var(--text-main);
  color: var(--bg-color);
  border: none;
  font-weight: 600;
}
.btn-dark:hover {
  background-color: #d4d4d8;
  color: var(--bg-color);
}

.btn-outline-dark {
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-outline-dark:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-light {
  background-color: var(--accent-cyan);
  color: var(--bg-color);
  border: none;
  font-weight: 600;
}
.btn-light:hover {
  background-color: #0891b2;
  color: var(--bg-color);
}

.btn-outline-light {
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-outline-light:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* Badges */
.badge.text-bg-dark {
  background-color: var(--bg-surface-hover) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
}

.badge.text-bg-light {
  background-color: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--text-main);
}


/* Mobile Responsiveness & Premium Aesthetics */

/* Navbar Mobile Detached Dropdown */
@media (max-width: 991.98px) {
  .portfolio-nav {
    border-radius: 24px;
    padding: 0.75rem 1.2rem;
  }
  
  /* Detach the mobile menu so it floats below the pill instead of stretching it */
  .portfolio-nav .navbar-collapse {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  
  .hero-section {
    position: relative;
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 2rem;
    display: flex;
    align-items: flex-end;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
  }
  
  .hero-section .container {
    position: relative;
    z-index: 2;
    padding-bottom: 2rem;
  }
  
  /* Break out the image to fill the screen */
  .hero-image-wrapper {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .hero-image-wrapper::after {
    display: none; /* Hide glass border on full screen */
  }
  
  /* The black gradient fade at the bottom */
  .hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0) 0%, rgba(10,10,10,0.5) 40%, rgba(10,10,10,0.95) 75%, rgba(10,10,10,1) 100%);
    z-index: 1;
  }
  
  .hero-image-wrapper img {
    height: 100%;
    object-position: center top;
  }
  
  .bg-glow {
    display: none; /* Disable glow on mobile to let the photo shine */
  }
  
  .hero-subtitle-bar {
    justify-content: center;
  }
  
  .hero-subtitle-bar::before {
    display: none; /* Hide the line for a cleaner centered look */
  }
  
  .hero-section .d-flex.flex-wrap {
    justify-content: center;
    position: relative;
    z-index: 2;
  }
  
  .status-indicator {
    display: none !important;
  }
  
  /* Horizontal scrolling for skill filters */
  #skill-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    justify-content: flex-start !important;
  }
  
  #skill-filters::-webkit-scrollbar {
    display: none;
  }
  
  .skill-filter-btn {
    white-space: nowrap;
    flex: 0 0 auto;
  }
}

@media (max-width: 575.98px) {
  .portfolio-nav {
    width: 95%;
    top: 1rem;
  }
  
  .hero-headline-massive {
    font-size: clamp(3rem, 14vw, 4.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    position: relative;
    z-index: 2;
  }
  
  .hero-subtitle-bar {
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
  }
  
  .hero-section p.lead {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    color: #e2e8f0 !important; /* Brighter text on the black gradient */
    position: relative;
    z-index: 2;
  }
  
  /* Premium Gradient Button */
  .hero-section .btn-light {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
  }
  
  .skill-filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
  
  .section-block {
    padding: 3rem 0;
  }

  h2.section-title {
    font-size: 1.75rem;
  }

  .skill-card, .timeline-card, .service-card, .testimonial-card, .project-card, .contact-card {
    padding: 1.25rem;
  }
}

.flash-stack {
  position: fixed;
  top: 6rem;
  right: 1.5rem;
  z-index: 1050;
  max-width: 350px;
}

@media (max-width: 575.98px) {
  .flash-stack {
    top: 5rem;
    right: 50%;
    transform: translateX(50%);
    width: 90%;
  }
}
