/* ═══════════════════════════════════════════════════════
   GLOBAL RESETS & BASE
═══════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --cyan:            #00ffff;
  --cyan-dim:        rgba(0, 255, 255, 0.15);
  --cyan-glow:       rgba(0, 255, 255, 0.5);
  --bg-dark:         #0a0a0a;
  --bg-card:         #1a1a1a;
  --bg-section-alt:  #111111;
  --text-primary:    #ffffff;
  --text-muted:      #aaaaaa;
  --border-subtle:   rgba(0, 255, 255, 0.2);
  --transition:      all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Prevent layout shift from scrollbar appearance */
  scrollbar-gutter: stable;
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════ */
#navbar {
  background: rgba(10, 10, 10, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 255, 255, 0.08);
  transition: var(--transition);
  padding: 10px 20px;
}

.brand-logo {
  border-radius: 6px;
  filter: brightness(0.9);
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-accent {
  color: var(--cyan);
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px !important;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 14px;
  height: 2px;
  width: 0%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 28px);
}

/* Mobile nav: collapse menu dark background */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 10, 10, 0.97);
    border-radius: 0 0 10px 10px;
    padding: 12px 0;
    margin-top: 6px;
  }

  .nav-link {
    padding: 10px 20px !important;
    font-size: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════════ */
.section {
  padding: 90px 20px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  transition: var(--transition);
}

.section.bg-secondary,
.bg-secondary {
  background-color: var(--bg-section-alt) !important;
}

.section *,
.section.bg-secondary * {
  color: var(--text-primary);
}

h2 {
  margin-bottom: 30px;
  border-bottom: 2px solid #2a2a2a;
  padding-bottom: 12px;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: default;
  transition: var(--transition);
}

h2 i {
  color: var(--cyan);
}

/* ═══════════════════════════════════════════════════════
   HERO / HOME SECTION
═══════════════════════════════════════════════════════ */
.section-home {
  position: relative;
  min-height: 100vh;
  background-color: #000000;
  overflow: hidden;
  padding: 80px 0 0;
}

/* Particles canvas */
#tsparticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: all;
}

/* Fade gradient at the bottom of the hero */
.section-home::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background: linear-gradient(to bottom, transparent, #000000);
  pointer-events: none;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
}

.hero-row {
  min-height: calc(100vh - 80px);
  padding: 40px 15px;
}

.hero-text {
  padding-right: 2rem;
}

.hero-eyebrow {
  font-size: 1rem;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  color: #fff;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  min-height: 40px;
  margin-bottom: 12px;
  font-weight: 400;
}

.hero-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  max-width: 480px;
  line-height: 1.7;
}

.highlight-name {
  background: linear-gradient(135deg, #e8e8e8, #b0b0b0, #e8e8e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: metallic-shine 3s ease-in-out infinite;
}

@keyframes metallic-shine {
  0%,  100% { filter: brightness(1)    drop-shadow(0 0 10px rgba(255, 255, 255, 0.2)); }
  50%        { filter: brightness(1.25) drop-shadow(0 0 22px rgba(255, 255, 255, 0.5)); }
}

/* ── Hero buttons ── */
.btn-hero-primary {
  background: var(--cyan);
  color: #000;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 6px;
  border: 2px solid var(--cyan);
  transition: var(--transition);
}

.btn-hero-primary:hover {
  background: transparent;
  color: var(--cyan);
  box-shadow: 0 0 18px var(--cyan-glow);
}

.btn-hero-outline {
  background: transparent;
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: var(--transition);
}

.btn-hero-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}

/* ── Social icons ── */
.social-icons a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 10px;
  font-size: 1.4rem;
  transition: var(--transition);
  display: inline-block;
}

.social-icons a:hover {
  color: var(--cyan);
  transform: translateY(-3px);
  filter: drop-shadow(0 0 8px var(--cyan));
}

/* ── Profile image ── */
.profile-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a0a0a;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black 58%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 40%, black 58%, transparent 100%);
}

.profile-circle {
  display: none;
}

.profile-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(0, 255, 255, 0.9);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.6), 0 0 12px rgba(0, 255, 255, 0.3) inset;
  z-index: 2;
  pointer-events: none;
}

.floating-profile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: contrast(1.03) saturate(1.04);
}

.profile-wrapper:hover .floating-profile {
  transform: scale(1.04);
  filter: contrast(1.07) saturate(1.08) brightness(1.03);
}

/* ── Hero responsive ── */
@media (max-width: 991px) {
  .hero-text {
    padding-right: 0;
    text-align: center;
  }

  .hero-desc {
    margin: 0 auto;
  }

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

  .hero-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-btns .btn {
    margin: 0 !important;
  }

  .profile-wrapper {
    width: 260px;
    height: 260px;
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .section-home {
    padding-top: 70px;
  }

  .hero-row {
    padding: 30px 10px;
  }

  .profile-wrapper {
    width: 200px;
    height: 200px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* ═══════════════════════════════════════════════════════
   CARDS (shared)
═══════════════════════════════════════════════════════ */
.card {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background-color: var(--bg-card) !important;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 0 20px var(--cyan-dim);
  border-color: var(--border-subtle);
  transform: translateY(-4px);
}

.card-body p,
.card-body h5,
.card-body label {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   PROJECTS — GRID + FILTER
═══════════════════════════════════════════════════════ */
.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-btn {
  border: 2px solid var(--cyan);
  color: var(--cyan);
  background: transparent;
  padding: 8px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--cyan);
  color: #000;
  box-shadow: 0 0 14px var(--cyan-glow);
}

/* Grid layout for projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Card animation for filter */
.project-card {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-card) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  animation: cardAppear 0.35s ease both;
}

@keyframes cardAppear {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.project-card.hidden {
  display: none;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 255, 255, 0.2);
  border-color: rgba(0, 255, 255, 0.4);
}

.project-img {
  height: 190px;
  object-fit: cover;
  width: 100%;
}

.project-badge {
  display: inline-block;
  background-color: rgba(13, 110, 253, 0.2);
  border: 1px solid rgba(13, 110, 253, 0.4);
  color: #6ea8fe;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  margin-right: 6px;
  margin-bottom: 6px;
}

.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════════════
   CERTIFICATIONS — horizontal scroll track
═══════════════════════════════════════════════════════ */
.certifications-container {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) transparent;
  padding-bottom: 16px;
  cursor: grab;
  /* Better touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
}

.certifications-container::-webkit-scrollbar         { height: 4px; }
.certifications-container::-webkit-scrollbar-thumb   { background: var(--cyan); border-radius: 4px; }

.certifications-track {
  display: inline-flex;
  gap: 24px;
  padding: 10px 4px;
  width: max-content;
}

.certifications-track .project-card {
  width: 280px;
}

.certifications-track .project-img {
  height: 180px;
  object-fit: contain;
  background-color: #111;
  padding: 10px;
}

/* Mobile: make cert cards scrollable but properly sized */
@media (max-width: 576px) {
  .certifications-track .project-card {
    width: 240px;
  }
}

/* ═══════════════════════════════════════════════════════
   INTERNSHIP CAROUSEL
═══════════════════════════════════════════════════════ */
.internship-carousel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

/* The visible window — overflow: hidden clips the sliding cards */
.internship-viewport {
  flex: 1;
  overflow: hidden;
}

/* The sliding track */
.internship-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.internship-card {
  position: relative;
  min-width: 100%;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 0 20px var(--cyan-dim);
  text-align: center;
  transition: box-shadow 0.3s ease;
}

.internship-card:hover {
  box-shadow: 0 0 28px var(--cyan-glow);
}

.internship-card h5 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.internship-card .role {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.internship-card .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.internship-card p:not(.role):not(.date) {
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 6px;
}

.internship-logo {
  max-width: 180px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 auto 14px;
  background: #222;
  padding: 10px 16px;
  display: block;
}

/* ── Experience type badge (top-right of card) ── */
.exp-type-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  pointer-events: none;
}

.badge-intern {
  background: rgba(0, 255, 255, 0.12);
  border: 1px solid rgba(0, 255, 255, 0.45);
  color: var(--cyan);
}

.badge-fulltime {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #4ade80;
}

.badge-parttime {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}

.badge-freelance {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #a78bfa;
}

.badge-contract {
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.45);
  color: #fb923c;
}

/* ── Carousel arrows ── */
.carousel-arrow {
  flex-shrink: 0;
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: #555;
  color: #555;
}

.carousel-arrow:hover:not(:disabled) {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 12px var(--cyan-glow);
  transform: scale(1.1);
}

/* ── Dot indicators ── */
.internship-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.internship-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #444;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.internship-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  transform: scale(1.3);
}

/* Mobile: smaller arrows so they don't crowd the card */
@media (max-width: 576px) {
  .internship-carousel {
    gap: 8px;
  }

  .carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .internship-card {
    padding: 24px 16px;
  }
}

/* ═══════════════════════════════════════════════════════
   EDUCATION TIMELINE
═══════════════════════════════════════════════════════ */
.edu-tree {
  position: relative;
  margin: 0 auto;
  padding: 20px 0;
  max-width: 800px;
}

.edu-tree::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(to bottom, transparent, var(--cyan), transparent);
  transform: translateX(-50%);
}

.edu-branch {
  position: relative;
  width: 60%;
  padding: 20px;
  margin-bottom: 10px;
}

.edu-branch:nth-child(odd)  { left: -10%; text-align: right; }
.edu-branch:nth-child(even) { left: 50%;  text-align: left;  }

.edu-node {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 0 14px var(--cyan-dim);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

.edu-node:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px var(--cyan-glow);
  border-color: rgba(0, 255, 255, 0.5);
}

.edu-icon {
  font-size: 22px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.edu-node h5   { color: #fff;              font-weight: 700;           }
.edu-node span { color: var(--text-muted); font-size: 0.9rem;  display: block; }
.edu-node p    { color: var(--text-muted); font-size: 0.85rem; margin: 6px 0 0; }

.edu-branch::before {
  content: "";
  position: absolute;
  top: 34px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #000;
  box-shadow: 0 0 10px var(--cyan-glow);
  z-index: 1;
}

.edu-branch:nth-child(odd)::before  { right: -9px; }
.edu-branch:nth-child(even)::before { left:  -9px; }

@media (max-width: 768px) {
  .edu-tree::before { left: 20px; }

  .edu-branch {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 45px;
    margin-bottom: 24px;
  }

  .edu-branch::before {
    left: 10px !important;
    right: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════
   CONTACT FORM
═══════════════════════════════════════════════════════ */
.form-control {
  background: #1a1a1a !important;
  border: 1px solid #333;
  color: #fff !important;
  border-radius: 8px;
  transition: var(--transition);
}

.form-control::placeholder {
  color: #666;
}

.form-control:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-dim);
  outline: none;
  background: #1a1a1a !important;
  color: #fff !important;
}

.custom-success {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid #00d4ff;
  color: #00d4ff;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 15px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════════════════════
   BUTTONS (general)
═══════════════════════════════════════════════════════ */
.btn {
  border-radius: 7px;
  font-weight: 600;
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 14px var(--cyan-glow);
}

.btn-outline-info {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-outline-info:hover {
  background: var(--cyan);
  color: #000;
}

.btn-outline-light:hover {
  background-color: var(--cyan);
  border-color: var(--cyan);
  color: #000;
}

/* ═══════════════════════════════════════════════════════
   FOOTER  — fixed alignment & proper spacing
═══════════════════════════════════════════════════════ */
.site-footer {
  background: #050505;
  border-top: 1px solid rgba(0, 255, 255, 0.08);
  /* Ensure footer always sits at the very bottom with consistent padding */
  padding: 28px 20px;
  /* Clear any floats/flex siblings */
  width: 100%;
}

.footer-copy {
  font-size: 0.85rem;
  color: #555;
}

/* ═══════════════════════════════════════════════════════
   SCROLLBAR (global)
═══════════════════════════════════════════════════════ */
::-webkit-scrollbar         { width: 6px; }
::-webkit-scrollbar-track   { background: #0a0a0a; }
::-webkit-scrollbar-thumb   { background: #333; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ═══════════════════════════════════════════════════════
   SMOOTH PAGE TRANSITIONS
═══════════════════════════════════════════════════════ */
section {
  transition: opacity 0.3s ease;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE TWEAKS
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .section {
    padding: 70px 16px;
  }

  .hero-btns .btn {
    display: block;
    width: 100%;
    margin: 8px 0 !important;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 1.4rem;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}

/* ── Reduced-motion: respect user preference ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
