/* ----------------------------------------
   Root Variables & Global Styles
---------------------------------------- */
:root {
  --accent: #17a2b8;
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --text-light: #e9ecef;
  --text-muted: #c9d1d9;
  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --bg-overlay: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-light);
  background-color: var(--bg-dark);
  scroll-behavior: smooth;
}

/* ----------------------------------------
   Navbar
---------------------------------------- */
/* -----------------------------
   NAVBAR STYLING
-------------------------------*/

/* Navbar Container */
.navbar {
  font-family: 'Inter', sans-serif;
  padding: 0.6rem 1rem;
  z-index: 1000;
}

/* Logo Circle */
.navbar-brand .logo-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 38px;
  border-radius: 50%;
  background-color: #17a2b8; /* accent color */
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 0 10px rgba(23, 162, 184, 0.6);
  margin-right: 8px;
}

/* Brand Name */
.navbar-brand .brand-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: #17a2b8;
  letter-spacing: 0.5px;
}

/* Nav Links */
.navbar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 0.5rem 1rem;
  color: #ccc;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Hover / Active Effect */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #17a2b8 !important;
}

.navbar-nav .nav-link::after {
  content: '';
  display: block;
  height: 2px;
  background: #17a2b8;
  width: 0%;
  transition: width 0.3s ease;
  position: absolute;
  bottom: 0;
  left: 0;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

/* Nav Icon */
.nav-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.navbar-nav .nav-link:hover .nav-icon {
  filter: brightness(0) invert(0.6) sepia(1) hue-rotate(180deg) saturate(5);
}

/* Mobile Spacing */
@media (max-width: 991px) {
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
  }
}

/* Fixed Navbar Top Padding for Body */
body {
  padding-top: 60px; /* adjust based on navbar height */
}


/* ----------------------------------------
   HOME / BANNER (index.html)
---------------------------------------- */
#home {
  height: 100vh;
  min-height: 520px;
  background-image:
    linear-gradient(var(--bg-overlay), rgba(0, 0, 0, 0.65)),
    url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1950&q=80');
  background-size: cover;
  background-position: center;
  padding-top: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

#home h1 {
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 700ms ease forwards 200ms;
}

#home p.lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.125rem;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 700ms ease forwards 400ms;
}

.accent { color: var(--accent); }

#home .btn-info {
  background: var(--accent);
  border: none;
}

#home .btn-info:hover {
  filter: brightness(.95);
  transform: translateY(-1px);
  transition: 0.2s;
}

#home .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.2);
}

.social a {
  opacity: 0.95;
  transition: all 0.18s ease;
}

.social a:hover {
  transform: translateY(-3px);
  opacity: 1;
}


.typewriter-container {
  display: block;          /* Make it block to center */
  margin: 0 auto 1.5rem;  /* Center horizontally and add bottom margin */
  width: fit-content;      /* Adjust width to content */
  text-align: center;      /* Center the text inside */
  white-space: nowrap;
  overflow: hidden;
  
}

.cursor {
  display: inline-block;
  animation: blink 0.8s infinite;
  color: #17a2b8; /* Accent color */
  font-weight: bold;
}


@keyframes blink {
  0%, 50% { opacity: 1; }
  50%, 100% { opacity: 0; }
}



@media (max-width: 768px) {
  #home h1 { font-size: 2rem; }
  #home p.lead { font-size: 1rem; }
}

#backToTop {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99;
  background-color: #0dcaf0; /* Bootstrap info color */
  color: white;
  border: none;
  outline: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  display: none; /* hidden by default */
  transition: background-color 0.3s;
}

#backToTop:hover {
  background-color: #0bbcd9;
}

/* ----------------------------------------
   ABOUT SECTION
---------------------------------------- */
#about {
  background-color: #ffffff;
  color: #0d1117;
  padding: 100px 0;
}

#about h2 {
  color: var(--accent);
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}

#about p {
  color: #333;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

#about .highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ----------------------------------------
   CONTACT SECTION
---------------------------------------- */
#contact {
  background-color: #ffffff;
  color: #0d1117;
  padding: 100px 0;
}

#contact h2 {
  color: var(--accent);
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}

#contact form {
  max-width: 700px;
  margin: 0 auto;
}

#contact label {
  font-weight: 600;
  color: #0d1117;
}

#contact input,
#contact textarea {
  width: 100%;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 1rem;
  color: #333;
  transition: border-color 0.2s ease;
}

#contact input:focus,
#contact textarea:focus {
  border-color: var(--accent);
  outline: none;
}

#contact button {
  background-color: var(--accent);
  border: none;
  padding: 12px 30px;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#contact button:hover {
  background-color: #138496;
  transform: translateY(-2px);
}
/* Error Styling */
input.error, textarea.error {
  border-color: #dc3545 !important; /* Red for error */
  background-color: rgba(220, 53, 69, 0.1);
}

input.error:focus, textarea.error:focus {
  border-color: #dc3545;
  outline: none;
}

/* ----------------------------------------
   Projects Page
---------------------------------------- */
body.projects-page {
  background-color: var(--bg-dark);
  padding-top: 90px;
  min-height: 100vh;
}

.project-title {
  color: var(--accent);
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 0 0 10px rgba(23, 162, 184, 0.6);
}

/* Project Cards */
.project-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(23, 162, 184, 0.3);
  border-radius: 12px;
  text-align: center;
  padding: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(23, 162, 184, 0.2);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px rgba(23, 162, 184, 0.5);
  border-color: rgba(23, 162, 184, 0.6);
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.project-card h5 {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 70px;
  margin-bottom: 20px;
}

/* Project Buttons */
.project-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.project-btns a {
  background-color: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.2s;
}

.project-btns a:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
}

/* ----------------------------------------
   Skills Earned Section
---------------------------------------- */
.skills-earned {
  background: linear-gradient(180deg, #0d1117 0%, #101820 100%);
  text-align: center;
  padding: 80px 0;
}

.skills-earned h2 {
  color: var(--accent);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(23, 162, 184, 0.6);
  margin-bottom: 50px;
}

.skill-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 30px 20px;
  border: 1px solid rgba(23, 162, 184, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(23, 162, 184, 0.2);
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px rgba(23, 162, 184, 0.5);
  border-color: rgba(23, 162, 184, 0.6);
}

.skill-card i {
  color: var(--accent);
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.skill-card h5 {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ----------------------------------------
   Footer
---------------------------------------- */
footer {
  background: #0b0f13;
  color: #ccc;
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 80px;
}

/* ----------------------------------------
   Animations
---------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------
   Project Detail Pages (Sales, Water, Crime)
---------------------------------------- */
.project-hero {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  padding: 120px 0 80px;
  margin-top: 56px;
}

.project-hero h1 {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(23, 162, 184, 0.5);
}

.project-hero p.lead {
  color: #c9d1d9 !important;
  font-size: 1.125rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 30px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c9d1d9;
}

.meta-item i {
  color: var(--accent);
  font-size: 1.2rem;
}

.section-title {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(23, 162, 184, 0.3);
}

.insight-card {
  background: var(--bg-card);
  border: 1px solid rgba(23, 162, 184, 0.3);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.insight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(23, 162, 184, 0.3);
  border-color: var(--accent);
}

.insight-card h4 {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.insight-card p {
  color: #c9d1d9 !important;
  line-height: 1.7;
  margin: 0;
}

.insight-card p strong {
  color: #e9ecef;
}

.screenshot-container {
  background: var(--bg-card);
  border: 1px solid rgba(23, 162, 184, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.screenshot-container:hover {
  box-shadow: 0 10px 30px rgba(23, 162, 184, 0.4);
  border-color: var(--accent);
}

.screenshot-container img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
  background: #0d1117;
}

.screenshot-caption {
  color: #e9ecef;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.screenshot-description {
  color: #c9d1d9 !important;
  font-size: 0.95rem;
  line-height: 1.7;
}

.screenshot-description strong {
  color: var(--accent) !important;
  font-weight: 600;
}

.key-finding {
  background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
  border-left: 4px solid var(--accent);
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
}

.key-finding h5 {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.key-finding p {
  color: #c9d1d9 !important;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid rgba(23, 162, 184, 0.3);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(23, 162, 184, 0.3);
}

.stat-box h5 {
  color: #e9ecef;
}

.stat-box p {
  color: #c9d1d9;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  color: #c9d1d9;
  font-size: 0.9rem;
  margin-top: 10px;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tech-badge {
  background: rgba(23, 162, 184, 0.2);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.content-section {
  padding: 60px 0;
  background: var(--bg-dark);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.project-tech .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (max-width: 768px) {
  .project-card p,
  .skill-card p {
    font-size: 0.85rem;
  }
  
  .project-hero {
    padding: 100px 0 60px;
  }
  
  .project-meta {
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Floating Back Button */
.back-btn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  background-color: var(--accent);
  color: #fff;
  padding: 14px 18px;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(1, 90, 104, 0.5);
  transition: 0.3s ease;
  z-index: 1000;
}
.back-btn:hover {
  background-color: #08c1dd;
  transform: translateY(-2px);
  color: #fff;
}


/* ----------------------------------------
   Image Quality Enhancement
---------------------------------------- */
.screenshot-container img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
  /* Improve image rendering quality */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  /* Prevent blurriness on scaling */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* Smooth rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* High DPI/Retina display optimization */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
  .screenshot-container img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Force native resolution display */
.screenshot-container {
  max-width: 100%;
  overflow: hidden;
}

.screenshot-container img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}