/* ========================
   GLOBAL STYLES
======================== */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0d0d1a, #1a1a40);
  color: #eaeaea;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ========================
   HEADER
======================== */
header {
  background: url("images/background.jpg") no-repeat center center/cover;
  color: white;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 10, 25, 0.85);
  backdrop-filter: blur(6px);
  z-index: 0;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  text-shadow: 0 0 12px #00c8ff;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

header h1, header p, header a, header img {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s ease-in-out;
}

/* ========================
   PROFILE IMAGE
======================== */
.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #00c8ff;
  margin-bottom: 1.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 0 25px rgba(0, 200, 255, 0.6);
}
.profile-pic:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 0 35px rgba(0, 200, 255, 0.8);
}

/* ========================
   NAVIGATION
======================== */
nav {
  background: rgba(28, 28, 46, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 8px 8px;
}

nav a {
  color: #eaeaea;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #00c8ff;
  transition: width 0.3s;
  margin: auto;
}

nav a:hover {
  color: #00c8ff;
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: #00c8ff;
}
nav a.active::after {
  width: 100%;
}

/* ========================
   CONTAINER & LAYOUT SECTIONS
======================== */
.container {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: fadeIn 1.5s ease;
}

.fullscreen-container {
  width: 100%;
  margin: 0;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: left;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #00c8ff;
  text-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}

/* ========================
   HIGH-CONVERSION EXPERIENCE & PROJECT CARDS
======================== */
.project-card {
  text-align: left;
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  position: relative; /* For badges positioning */
}

.project-intro p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* Top Card Badges */
.card-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 200, 255, 0.15);
  color: #00c8ff;
  border: 1px solid rgba(0, 200, 255, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Experience Metrics Ribbon Engine */
.metrics-ribbon {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem 0;
}

.metric-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #cfd8dc;
}

.metric-pill strong {
  color: #00c8ff;
}

/* Before vs After Impact Block Architecture */
.impact-grid {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}

.impact-block {
  flex: 1;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.impact-block h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.impact-block.before {
  border-left: 4px solid #ff4a4a;
  background: rgba(255, 74, 74, 0.06);
}
.impact-block.before h4 {
  color: #ff4a4a;
}

.impact-block.after {
  border-left: 4px solid #00ff88;
  background: rgba(0, 255, 136, 0.06);
}
.impact-block.after h4 {
  color: #00ff88;
}

/* Gallery & Figures Layout */
.gallery-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

figure {
  text-align: center;
  margin: 1.5rem 0;
  flex: 1;
  min-width: 300px;
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #a0aec0;
  font-style: italic;
}

.dashboard-img {
  width: 100%;
  max-width: 540px; 
  height: auto; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 8px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.dashboard-img:hover {
  transform: scale(1.02);
  border-color: #00c8ff;
}

/* ========================
   CONVERSION TARGETED BUTTONS
======================== */
.cta-group {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, #00c8ff, #0077ff);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 200, 255, 0.3);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 200, 255, 0.5);
}

.btn.secondary {
  background: #2d3748;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn.secondary:hover {
  background: #1a202c;
  border-color: #00c8ff;
  transform: translateY(-2px);
}

.btn.dead {
  background: rgba(255, 255, 255, 0.05);
  color: #a0aec0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: default;
}

/* Footer Section Code Cards */
.github-footer-card {
  background: rgba(10, 10, 25, 0.5);
  border: 1px dashed rgba(0, 200, 255, 0.3);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 4rem;
}

.github-link {
  color: #00c8ff;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  margin: 1rem 0;
  font-size: 1.1rem;
}
.github-link:hover {
  text-decoration: underline;
}

.navigation-footer {
  margin-top: 1.5rem;
}
.btn.home-btn {
  background: transparent;
  color: #eaeaea;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn.home-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Legacy global button class kept for index compatibility */
.cta-button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, #00c8ff, #0077ff);
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(0, 200, 255, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 200, 255, 0.6);
}

/* ========================
   LISTS & DEPRECATED ELEMENTS
======================== */
ul {
  padding-left: 0;
  text-align: left;
  list-style: none;
  display: grid;
  gap: 1rem;
}

/* Default project / home list items */
ul li {
  background: rgba(255, 255, 255, 0.07);
  padding: 0.40rem 1.2rem;
  border-radius: 100px;
  transition: transform 0.3s ease, background 0.3s ease;
  font-size: 0.80rem;
}

/* Core Override: Ensures description lines in job cards read beautifully */
.project-card ul li {
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 6px !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  border-left: 2px solid rgba(0, 200, 255, 0.3);
}

.dashboard-frame {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  margin-top: 1.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.dashboard-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 50px rgba(0, 200, 255, 0.3);
}

/* ========================
   FOOTER
======================== */
footer {
  text-align: center;
  background: rgba(10, 10, 25, 0.95);
  color: #eaeaea;
  padding: 1.5rem;
  margin-top: 3rem;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ========================
   ANIMATIONS
======================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================
   RESPONSIVE DESIGN (FIXED)
======================== */
@media (max-width: 768px) {
  header h1 { font-size: 2.2rem; }
  header p { font-size: 1rem; }
  .profile-pic { width: 120px; height: 120px; }
  .dashboard-frame { height: 400px; }
  .card-badge { position: relative; top: 0; right: 0; display: inline-block; margin-bottom: 1rem; }
  
  /* FIXED: Reduce container outer footprint so it snaps within the screen bounds */
  .container {
    margin: 1.5rem auto;
    padding: 1rem;
    width: auto;
  }

  /* FIXED: Reduce inner card padding so tags stay inside boundaries */
  .project-card {
    padding: 1.25rem;
  }

  .github-footer-card {
    padding: 1.25rem;
    margin-top: 2rem;
  }

  /* FIXED: Ensure mobile viewports wrap navigation buttons correctly */
  nav {
    gap: 12px;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
  }

  .impact-grid {
    flex-direction: column;
    gap: 1rem;
  }
  .cta-group {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    text-align: center;
    width: 100%;
    box-sizing: border-box; /* Ensures padding does not break button widths */
  }
}