/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}




body {
  font-family: 'Times New Roman', Times, serif;
  background-color: #030708;
  background-image:
    radial-gradient(circle at 12% 24%, rgba(119, 180, 132, 0.07), transparent 28%),
    radial-gradient(circle at 90% 88%, rgba(114, 176, 128, 0.07), transparent 26%),
    radial-gradient(circle at 52% -8%, rgba(67, 108, 144, 0.08), transparent 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='224' height='192' viewBox='0 0 224 192'%3E%3Cg fill='none' stroke='%23475d6a' stroke-opacity='0.22' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpolygon points='56,0 112,32 112,96 56,128 0,96 0,32'/%3E%3Cpolygon points='168,0 224,32 224,96 168,128 112,96 112,32'/%3E%3Cpolygon points='112,96 168,128 168,192 112,224 56,192 56,128'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, #030809 0%, #020607 55%, #020506 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-size: auto, auto, auto, 280px 240px, auto;
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  background-position: center center;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.8;
  padding-left: 0; /* offset if sidebar, adjust if needed */
}


.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 200px;
  background-color: #0b0c10;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center; /* center nav items vertically */
  align-items: center;
}


.nav-links {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 40px; /* space between icons */
  align-items: center;
  width: 100%;
}



.nav-links li {
  margin: 20px 0;
  width: 100%;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 20px;
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent-green);
}

.nav-links i {
  margin-right: 10px;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 160px auto 60px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 320px;
  max-width: 600px;
  text-align: left;
}

.hero-text h3 {
  font-size: 30px;
  font-weight: 300;
}

.hero-text h1 {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.2;
  margin: 10px 0 20px;
}

.hero-text p {
  font-size: 22px;
  color: #cccccc;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 30px;
}

.highlight-name,
.highlight-role {
  color: var(--accent-green);
}

.btn {
  background-color: var(--accent-green);
  color: #000;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  transition: 0.3s;
  text-decoration: none;
}

.btn:hover {
  background-color: #4dd68f;
}

.hero-img {
  flex-shrink: 0;
  text-align: right;
}

.photo-wrapper.option1 {
  position: relative;
  display: inline-block;
}

.photo-wrapper.option1 img {
  width: 260px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  border: none;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}




/* Corner frame effect */
.photo-wrapper.option1 {
  position: relative;
  box-sizing: border-box; /* ensures borders are counted inside */
}

.photo-wrapper.option1::before,
.photo-wrapper.option1::after {
  content: none;
}


/* Responsive */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero-img {
    margin-top: 20px;
    text-align: center;
  }
}




/* Section Styling */
.section {
  max-width: 1200px;
  width: 95%;
  margin: 60px auto;
  padding: 0 20px;
  
}

.section-title,
.section-title-left {
  font-size: 28px;
  color: var(--accent-green);
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}

.section-title-left {
  text-align: left;
  padding-left: 10px;
}

.section-title::after,
.section-title-left::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 4px;
  background-color: #ff4d6d; /* red underline */
  border-radius: 2px;
}


.sub-heading {
  text-align: center;
  font-size: 22px;
  color: #48ff9b;
  margin: 30px 0 16px;
}

/* Skills Section */
.skills-section {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 40px;
}

.skills-box {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid #48ff9b;
  border-radius: 18px;
  padding: 30px 40px;
  width: 560px;
  box-shadow: 0 0 6px #48ff9b;
}

/* Hover effect - Dark Mode */
.skills-box:hover {
  transform: scale(1.02);
  box-shadow: 0 0 12px #48ff9b;
  transition: all 0.3s ease;
}

/* Hover effect - Light Mode */
body.light-mode .skills-box:hover {
  transform: scale(1.02);
  box-shadow: 0 0 12px #48ff9b;
}


.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 20px;
}

.icon-item {
  text-align: center;
}

.icon-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.icon-item p {
  margin-top: 6px;
  font-size: 16px;
  color: #ffffff;
  font-weight: 500;
}

/* Timeline Resume */
.edu-exp-two-col {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.resume-box {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(110, 255, 167, 0.08);
  flex: 1 1 48%;
}

.column-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.vertical-timeline {
  position: relative;   /* Required for timeline line positioning */
  padding-left: 25px;
}


.vertical-timeline::before {
  content: '';
  position: absolute;
  top: 15px; /* Move line start below first dot */
  left: -1.5px;
  width: 2px;
  height: 100%;
  background-color: var(--accent-green);
}


.timeline-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 40px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background-color: #ff4d6d;
  border: 2px solid #fff;
  border-radius: 50%;
  position: absolute;
  top: 4px;         /* Align vertically */
  left: -32px;      /* Bring dot closer to line */
}


.timeline-content h3 {
  font-size: 1.22rem;
  margin-bottom: 6px;
  color: #f5f9ff;
  line-height: 1.35;
}

.timeline-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.94rem;
  color: #b9c7da;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-content p,
.timeline-content ul li {
  font-size: 1.05rem;
  color: #d3dcea;
  margin-bottom: 7px;
  line-height: 1.65;
}

.timeline-content ul {
  padding-left: 18px;
  margin-top: 6px;
}

.timeline-content ul li::marker {
  color: #9eecc4;
}

/* Portfolio */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding-left: 10px;
}

.project-tile {
  display: block;
  background-color: rgba(255, 255, 255, 0.03);
  border-left: 4px solid #6effa7;
  color: #ffffff;
  padding: 18px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
}

.project-tile:hover {
  transform: scale(1.02);
  background-color: rgba(110, 255, 167, 0.05);
  box-shadow: 0 0 12px rgba(110, 255, 167, 0.6);
}

/* Contact Section */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 10px 0;
  text-align: center;
}

.contact-card {
  flex: 1 1 200px;
  max-width: 220px;
  text-align: center;
  padding: 20px;
  transition: background-color 0.3s ease;
}

.contact-card .icon {
  font-size: 36px;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.contact-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(110, 255, 167, 0.5);
  transform: translateY(-4px);
}


.contact-card h3 {
  margin-bottom: 6px;
  font-size: 18px;
  color: #ffffff;
}

.contact-card p,
.contact-card a {
  font-size: 14px;
  color: #cccccc;
  transition: color 0.3s ease;
}

.contact-card a:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

/* Contact Form */
.contact-form {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.form-row {
  display: flex;
  gap: 20px;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  border-radius: 40px;
  border: 1px solid #e5dfe9;
  background-color: #fdfaff;
  font-size: 16px;
}

.contact-form textarea {
  border-radius: 25px;
  resize: vertical;
}

.contact-form button {
  padding: 12px 40px;
  background-color: #dc143c;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background-color: #b11234;
}

/* Typed Role Animation */
.typed-text::after {
  content: '|';
  animation: blink 1s step-start infinite;
  margin-left: 2px;
}

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

#typed-role {
  display: inline-block;
  min-width: 24ch;
  white-space: nowrap;
  color: #48ff9b;
  font-weight: bold;
  padding-right: 5px;
  vertical-align: baseline;
}

.hero-story {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 14px;
  flex-wrap: wrap;
}

.story-label {
  font-size: 0.94rem;
  color: #b8c9dd;
  font-weight: 600;
}

.story-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(110, 255, 167, 0.28);
  background: rgba(110, 255, 167, 0.06);
  border-radius: 999px;
  padding: 6px 10px;
  max-width: 100%;
  overflow-x: auto;
}

.story-step {
  font-size: 0.84rem;
  color: #9fb2c8;
  font-weight: 600;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  white-space: nowrap;
}

.story-step.active {
  color: #dfffee;
  text-shadow: 0 0 12px rgba(110, 255, 167, 0.34);
}

.story-step.done {
  color: #88f2b9;
}

.story-arrow {
  color: #6f849e;
  font-size: 0.82rem;
}

/* What I Do Section - From Version 1 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 30px;
  padding: 0 10px;
}





.service-card .icon {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--accent-green);
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
  color: #ffffff;
}

.service-card p {
  font-size: 18px;
  color: #cccccc;
  line-height: 1.6;
}

.about-description {
  font-size: 20px;
  line-height: 1.9;
  color: #dddddd;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.cert-card {
  background-color: #111;
  border: 1px solid #2ee59d;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s;
}

.cert-card:hover {
  transform: translateY(-5px);
}

.cert-card h3 {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 8px;
}

.cert-card p {
  font-size: 14px;
  color: #bbbbbb;
  margin: 4px 0;
}

.cert-card a {
  font-size: 14px;
  color: #2ee59d;
  text-decoration: underline;
}

.portfolio-grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.portfolio-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-width: 280px;
}

/* Light Theme Overrides */
body.light-mode {
  background-color: #f5f5f5;
  color: #111;
  background-image: none;
}

body.light-mode .section-title,
body.light-mode .section-title-left,
body.light-mode .column-title,
body.light-mode .highlight-name,
body.light-mode h2,
body.light-mode h3,
body.light-mode p,
body.light-mode li {
  color: #111;
}

body.light-mode .sidebar {
  background-color: #ffffff;
}

body.light-mode .sidebar a {
  color: #111;
}

body.light-mode .section {
  border-top: 1px solid #ddd;
}

body.light-mode .project-tile,
body.light-mode .resume-box,
body.light-mode .service-card,
body.light-mode .cert-card,
body.light-mode .skills-box {
  background-color: #fff;
  color: #000;
  border-color: #48ff9b;
  box-shadow: 0 0 6px #48ff9b;
}

/* Fix green borders for service and cert cards in light mode */
body.light-mode .service-card,
body.light-mode .cert-card {
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 6px var(--accent-green) !important;
}

body.light-mode .contact-card {
  background-color: #fff;
  color: #000;
}

body.light-mode a {
  color: #007bff;
}

body.light-mode .theme-toggle {
  background-color: #eee;
}

body.light-mode .theme-toggle i {
  color: #000;
}

/* Toggle Button (Shared across themes) */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 2000;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle i {
  font-size: 18px;
  color: #fff;
  line-height: 1;
}

/* Define green variable for dark mode */
:root {
  --accent-green: #6effa7;
}

/* Override green for light mode */
body.light-mode {
  --accent-green: #48b78c;
}

/* Apply the dynamic accent color */
.highlight-name,
.section-title,
.btn,
.column-title,
h1 span,
h2 span,
h3 span {
  color: var(--accent-green) !important;
}

.btn {
  background-color: var(--accent-green);
  border: none;
}

.btn:hover {
  background-color: #00cc88;
}

/* Sidebar Links: Light & Dark Mode */
body.light-mode .sidebar a,
body.light-mode .sidebar a i {
  color: #000 !important;
}

body.dark-mode .sidebar a,
body.dark-mode .sidebar a i {
  color: #ffffff !important;
}

/* Fix button text in dark mode */
body.dark-mode a.btn,
body.dark-mode a.resume-btn {
  background-color: #6effa7 !important;
  color: #111 !important;
}

/* Optional hover fix */
body.dark-mode a.btn:hover,
body.dark-mode a.resume-btn:hover {
  background-color: #5fea97 !important;
}


body.light-mode .btn,
body.light-mode .resume-btn {
  background-color: #52b788 !important;
  color: #fff !important;
  border: none;
}

/* Fix timeline date visibility in light mode */
body.light-mode .timeline-date,
body.light-mode .timeline-date i,
body.light-mode .fa-calendar {
  color: #333 !important;
}

/* === LIGHT MODE FIXES === */

body.light-mode .section-title,
body.light-mode .section-title-left,
body.light-mode .column-title,
body.light-mode .contact-card h3,
body.light-mode #contact h2,
body.light-mode #portfolio h2,
body.light-mode #certifications h2,
body.light-mode #contact-form h2 {
  color: var(--accent-green) !important;
}

/* Project Tiles Text Color: Black in Light */
body.light-mode .project-tile {
  color: #111 !important;
  border-left: 4px solid var(--accent-green);
}

/* === DARK MODE FIXES === */

/* Project Tiles Text Color: White in Dark */
body.dark-mode .project-tile {
  color: #fff !important;
  border-left: 4px solid var(--accent-green);
}

/* Fix for contact card headings in light mode */
body.light-mode .contact-card h3,
body.light-mode .contact-card h4,
body.light-mode .contact-card p,
body.light-mode .contact-card span {
  color: #000;
}

body.light-mode a:visited {
  color: #000;
}

/* Fix for light mode link color in Contact section */
body.light-mode .contact-card a,
body.light-mode .contact-card a:visited {
  color: #000 !important;
}

/* Fix for headings inside contact-card (e.g., Email, GitHub) */
body.light-mode .contact-card h3 {
  color: #000 !important;
}

/* Light mode: Make all "View Certificate" links black */
body.light-mode .cert-card a {
  color: #000 !important;
}

/* Hover effect for certifications and contact cards in dark mode */
body.dark-mode .cert-card:hover,
body.dark-mode .contact-card:hover {
  box-shadow: 0 0 22px 4px rgba(111, 255, 167, 0.7);
  transform: scale(1.02);
  transition: all 0.3s ease;
}


/* Hover effect for contact cards in light mode */
body.light-mode .contact-card:hover {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
  transition: all 0.3s ease;
}

/* Light Mode Hover for Contact Cards */
body.light-mode .contact-card:hover {
  background-color: #e6f2ff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
  transition: 0.3s ease;
}

/* Sidebar hover effect for both light and dark mode */
.sidebar a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  padding-left: 10px;
  transition: all 0.3s ease;
  border-left: 3px solid var(--accent-green);
}

/* Sidebar Link Hover Effect for Light Mode */
body.light-mode .sidebar a:hover {
  background-color: #e6f0ff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
  transition: all 0.3s ease;
  border-radius: 8px;
}

/* Sidebar Link Hover Effect for Dark Mode */
body.dark-mode .sidebar a:hover {
  background-color: #0d0d0d;
  box-shadow: 0 0 12px rgba(110, 255, 167, 0.4);
  transform: scale(1.05);
  transition: all 0.3s ease;
  border-radius: 8px;
}


/* Center the last row (LinkedIn) in Contact section */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

/* Ensure contact-card is consistent */
.contact-card {
  width: 250px;
  text-align: center;
}

/* Shift the entire layout 20px to the right */
body {
  padding-left: 20px;
}

/* Optional: if your sidebar has a fixed or absolute position, offset it manually too */
.sidebar {
  margin-left: 20px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 200px;
  background-color: #0b0c10;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


.sidebar {
  left: 20px;
}

.main-container {
  margin-left: 220px;
}

/* Sidebar fix to remove left gap and preserve hover effect */
.sidebar {
  left: -10px;
  padding-left: 10px;
  box-shadow: 0 0 0 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main content shifted to the right */
.main-container {
  margin-left: 230px;
  padding-right: 20px;
}



.service-card {
  background-color: #fff;
  border: 1px solid #48ff9b;
  border-radius: 18px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}


.icon-circle {
  background: none;
  margin: 0 auto 16px;
  transition: transform 0.3s ease;
}

.service-card:hover .icon-circle {
  transform: scale(1.1);
  
}

.icon-circle i {
  color: #ff1744;
  font-size: 36px;
}

/* Text color fixes for .service-card in dark mode */
body.dark-mode .service-card h3 {
  color: #ffffff !important;
}

body.dark-mode .service-card p {
  color: #cccccc !important;
}

/* Text color fixes for .service-card in light mode */
body.light-mode .service-card h3 {
  color: #000 !important;
}

body.light-mode .service-card p {
  color: #444 !important;
}

/* === LIGHT MODE FIXES for service cards === */
body.light-mode .service-card {
  background-color: #ffffff;
  color: #000;
  border: 1px solid var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

body.light-mode .service-card h3,
body.light-mode .service-card p {
  color: #000;
}

/* === DARK MODE FIXES for service cards === */
body.dark-mode .service-card {
  background-color: #111;
  color: #fff;
  border: 1px solid var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

body.dark-mode .service-card h3,
body.dark-mode .service-card p {
  color: #fff;
}

/* Light mode hover effect for service cards */
body.light-mode .service-card:hover {
  background-color: #e6f2ff;
  box-shadow: 0 0 20px rgba(110, 255, 167, 0.5);
  transform: translateY(-4px);
  transition: all 0.3s ease;
}
body.dark-mode .service-card:hover {
  background-color: #111;
  box-shadow: 0 0 20px 4px rgba(110, 255, 167, 0.5);
  transform: translateY(-6px);
  transition: all 0.3s ease;
}


/* Light mode hover effect for project tiles */
body.light-mode .project-tile:hover {
  background-color: #e6f2ff;
  box-shadow: 0 0 20px rgba(110, 255, 167, 0.5);
  transform: translateY(-4px);
  transition: all 0.3s ease;
}

/* Light mode hover effect for certification cards */
body.light-mode .cert-card:hover {
  background-color: #e6f2ff;
  box-shadow: 0 0 20px rgba(110, 255, 167, 0.5);
  transform: translateY(-4px);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-container {
    margin-left: 0;
    padding: 20px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 768px) {
  .edu-exp-two-col {
    flex-direction: column;
    gap: 20px;
  }

  .resume-box {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .contact-grid {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .skills-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-text, .hero-img {
    text-align: center;
    width: 100%;
  }

  .hero-img img {
    max-width: 100%;
    height: auto;
  }
}

/* Responsive fix for hero text on smaller screens */
@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 32px;
    line-height: 1.3;
    text-align: center;
  }

  .hero-text h3 {
    font-size: 18px;
    text-align: center;
  }

  .hero-text p {
    font-size: 14px;
    text-align: center;
    padding: 0 10px;
  }

  .hero-img img {
    width: 90%;
    margin: 20px auto;
    display: block;
  }

  .btn, .resume-btn {
    font-size: 14px;
    padding: 10px 18px;
    margin: 10px 5px;
  }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* === High-UI Interactive Layer === */
:root {
  --ui-accent: #6effa7;
  --ui-glow: rgba(110, 255, 167, 0.45);
  --ui-panel: rgba(14, 18, 24, 0.7);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.22) 76%, rgba(0, 0, 0, 0.46) 100%),
    linear-gradient(to bottom, rgba(1, 7, 13, 0.06), rgba(1, 5, 10, 0.22));
  pointer-events: none;
  z-index: -2;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #ff4d6d 0%, var(--ui-accent) 100%);
  box-shadow: 0 0 12px rgba(110, 255, 167, 0.7);
  z-index: 5000;
  opacity: 0.55;
  transition: width 90ms linear, opacity 160ms ease, box-shadow 220ms ease;
}

.scroll-progress.is-scrolled {
  opacity: 1;
  box-shadow: 0 0 16px rgba(110, 255, 167, 0.78);
}

.bg-orb {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
  animation: orb-float 12s ease-in-out infinite;
}

.orb-1 {
  background: #1a84ff;
  top: -80px;
  right: -60px;
}

.orb-2 {
  background: #2ee59d;
  bottom: -140px;
  left: 180px;
  animation-delay: -5s;
}

.cursor-glow {
  position: fixed;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 255, 167, 0.16) 0%, rgba(110, 255, 167, 0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.main-container {
  position: relative;
  z-index: 1;
}

.hero {
  border: 1px solid rgba(110, 255, 167, 0.2);
  border-radius: 20px;
  background: linear-gradient(130deg, rgba(110, 255, 167, 0.06), rgba(10, 12, 18, 0.6));
  padding: 28px;
  backdrop-filter: blur(3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-stats {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-chip {
  border: 1px solid rgba(110, 255, 167, 0.35);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  font-size: 14px;
  color: #d8ffe9;
  padding: 8px 14px;
}

.stat-chip span {
  color: var(--ui-accent);
  font-weight: 700;
  margin-right: 6px;
}

.section,
.service-card,
.project-tile,
.cert-card,
.contact-card,
.skills-box,
.resume-box {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-card,
.skills-box,
.resume-box,
.cert-card {
  background: var(--ui-panel);
  border: 1px solid rgba(110, 255, 167, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.service-card:hover,
.skills-box:hover,
.resume-box:hover,
.cert-card:hover,
.contact-card:hover,
.project-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35), 0 0 18px rgba(110, 255, 167, 0.2);
  border-color: rgba(110, 255, 167, 0.5);
}

.sidebar {
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(110, 255, 167, 0.12);
}

.sidebar a {
  border-left: 3px solid transparent;
}

.sidebar a.active {
  color: var(--ui-accent) !important;
  border-left-color: var(--ui-accent);
  background: rgba(110, 255, 167, 0.08);
}

.reveal-item {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section.section-in-view {
  border-color: rgba(110, 255, 167, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2), 0 0 18px rgba(110, 255, 167, 0.14);
}

body.light-mode {
  --ui-panel: rgba(255, 255, 255, 0.82);
}

body.light-mode .hero {
  background: linear-gradient(130deg, rgba(82, 183, 136, 0.08), rgba(255, 255, 255, 0.9));
  border-color: rgba(82, 183, 136, 0.3);
}

body.light-mode .stat-chip {
  color: #153325;
  background: rgba(255, 255, 255, 0.65);
}

body.light-mode .sidebar {
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid rgba(32, 85, 57, 0.18);
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -14px) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}

@media (max-width: 768px) {
  .bg-orb,
  .cursor-glow {
    display: none;
  }

  .hero {
    margin-top: 120px;
    padding: 22px;
  }

  .hero-stats {
    justify-content: center;
  }
}

/* Sidebar consistency patch */
.sidebar {
  width: 220px;
}

.nav-links {
  gap: 20px;
  padding: 0 10px;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-size: 18px;
  line-height: 1.35;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
  align-items: center;
}

.nav-links i {
  width: 20px;
  margin-right: 8px;
  margin-top: 0;
  text-align: center;
  flex: 0 0 20px;
}

.nav-links a[href="#education-experience"] {
  white-space: normal;
  line-height: 1.25;
}

.main-container {
  margin-left: 230px;
}

@media (max-width: 980px) {
  .sidebar {
    width: 200px;
  }

  .main-container {
    margin-left: 0;
  }
}

/* Step 5: Project card structure */
.project-tile {
  display: block;
}

.project-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.project-tag {
  display: inline-block;
  font-size: 0.76rem;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(110, 255, 167, 0.45);
  color: #d9ffea;
  background: rgba(110, 255, 167, 0.08);
}

.project-cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-green);
  text-decoration: underline;
}

body.light-mode .project-tag {
  color: #14523b;
  background: rgba(72, 183, 140, 0.12);
  border-color: rgba(72, 183, 140, 0.52);
}

body.light-mode .project-cta {
  color: #146646;
}

.project-toggle-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.project-toggle-btn {
  border: 1px solid rgba(110, 255, 167, 0.52);
  background: rgba(110, 255, 167, 0.12);
  color: #dffff0;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.project-toggle-btn:hover {
  background: rgba(110, 255, 167, 0.2);
  transform: translateY(-1px);
}

.more-projects {
  margin-top: 16px;
}

.more-projects[hidden] {
  display: none !important;
}

body.light-mode .project-toggle-btn {
  color: #143f2d;
  background: rgba(72, 183, 140, 0.14);
  border-color: rgba(72, 183, 140, 0.56);
}

/* Step 7: Contact section polish */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.contact-card {
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 14px 12px;
}

.contact-card .icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(110, 255, 167, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  background: rgba(110, 255, 167, 0.05);
}

.contact-card .icon {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.contact-card h3 {
  margin-bottom: 2px;
  line-height: 1.3;
}

.contact-card p,
.contact-card a {
  text-align: center;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-card a {
  text-underline-offset: 2px;
}

.contact-card:hover {
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 16px rgba(110, 255, 167, 0.28);
  transform: translateY(-3px);
}

body.light-mode .contact-card {
  background-color: #ffffff;
}

body.light-mode .contact-card .icon-wrapper {
  border-color: rgba(72, 183, 140, 0.45);
  background: rgba(72, 183, 140, 0.1);
}

body.light-mode .contact-card:hover {
  background-color: #f2f9ff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1250px) {
  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    min-height: 176px;
  }
}

@media (max-width: 620px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: auto;
  }
}

/* Contact card height/overlap fix */
.contact-grid {
  align-items: start;
}

.contact-card {
  min-height: auto;
  height: auto;
}

.contact-card p,
.contact-card a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#contact {
  margin-bottom: 170px;
}

#contact-form {
  margin-top: 34px;
}

/* Final override: prevent oversized contact hover box */
body.dark-mode #contact .contact-card:hover,
body.light-mode #contact .contact-card:hover,
#contact .contact-card:hover {
  transform: translateY(-3px) scale(1) !important;
  box-shadow: 0 0 12px rgba(110, 255, 167, 0.24) !important;
}

/* Step 9: Mobile UX improvements */
.mobile-header,
.mobile-nav-drawer,
.mobile-nav-overlay {
  display: none;
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .sidebar {
    display: none !important;
  }

  .theme-toggle {
    top: 14px;
    right: 14px;
    z-index: 1300;
  }

  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: rgba(8, 12, 18, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1200;
  }

  .mobile-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(110, 255, 167, 0.35);
    background: rgba(110, 255, 167, 0.08);
    color: #ffffff;
    cursor: pointer;
  }

  .mobile-menu-btn i {
    font-size: 16px;
  }

  .mobile-brand {
    font-size: 0.92rem;
    color: #d9e7f8;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 130px);
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 8, 0.62);
    z-index: 1180;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-drawer {
    position: fixed;
    top: 58px;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px);
    background: #0a0f16;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1190;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    overflow-y: auto;
    display: block;
  }

  .mobile-nav-drawer.open {
    transform: translateX(0);
  }

  .mobile-nav-links {
    list-style: none;
    padding: 12px;
    margin: 0;
    display: grid;
    gap: 8px;
  }

  .mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f0f6ff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.35;
    border-radius: 10px;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
  }

  .mobile-nav-links a:hover,
  .mobile-nav-links a:focus-visible {
    color: var(--accent-green);
    border-left-color: var(--accent-green);
    outline: none;
  }

  .mobile-nav-links a.active {
    color: var(--accent-green);
    border-left-color: var(--accent-green);
    background: rgba(110, 255, 167, 0.12);
  }

  .main-container {
    margin-left: 0 !important;
    padding: 0 14px 28px !important;
  }

  .hero {
    margin-top: 90px;
    gap: 22px;
  }

  .section {
    margin-bottom: 44px;
    padding: 0 2px;
  }

  .hero-stats {
    gap: 8px;
  }

  .btn,
  .resume-btn {
    min-height: 42px;
  }
}

@media (max-width: 620px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }

  .theme-toggle i {
    font-size: 15px;
  }

  .mobile-header {
    height: 52px;
    padding: 0 10px;
  }

  .mobile-nav-drawer {
    top: 52px;
    width: min(90vw, 320px);
  }

  .hero {
    margin-top: 78px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 0.95rem;
  }

  .btn,
  .resume-btn {
    width: 100%;
    margin-right: 0;
  }
}

/* Step 10: Subtle animation polish */
.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.btn,
.project-tile,
.service-card,
.skills-box,
.resume-box,
.cert-card,
.contact-card {
  transition-duration: 180ms;
  transition-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .cursor-glow,
  .bg-orb {
    display: none !important;
  }
}

/* Step 11: Performance cleanup */
.section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.hero {
  content-visibility: visible;
}

.icon-item img {
  aspect-ratio: 1 / 1;
}

.bg-orb {
  will-change: transform, opacity;
}

@media (max-width: 980px) {
  body::before {
    background-size: 44px 44px;
    opacity: 0.75;
  }

  .bg-orb {
    opacity: 0.14;
    filter: blur(56px);
  }
}

@media (max-width: 620px) {
  body::before {
    display: none;
  }

  .bg-orb,
  .cursor-glow {
    display: none !important;
  }
}

/* Light theme softness adjustment */
body.light-mode {
  background-color: #eef3f8;
}

body.light-mode .sidebar {
  background-color: rgba(244, 248, 252, 0.95);
}

body.light-mode .section,
body.light-mode .skills-box,
body.light-mode .resume-box,
body.light-mode .service-card,
body.light-mode .project-tile,
body.light-mode .cert-card,
body.light-mode .contact-card {
  background-color: #f3f6fa !important;
  border-color: rgba(72, 183, 140, 0.3) !important;
  box-shadow: 0 0 8px rgba(72, 183, 140, 0.16) !important;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  background-color: #f8fafc !important;
  border-color: #cfd9e4 !important;
}

body.light-mode .mobile-header {
  background: rgba(244, 248, 252, 0.95);
}

/* Final fix: light-mode contact hover/lower-box issue */
body.light-mode #contact {
  margin-bottom: 96px !important;
}

body.light-mode #contact .contact-grid {
  align-items: start !important;
  overflow: visible;
}

body.light-mode #contact .contact-card {
  border: 1px solid rgba(72, 183, 140, 0.26) !important;
  border-radius: 0 !important;
  background: #f2f6fa !important;
  box-shadow: inset 0 0 0 1px rgba(72, 183, 140, 0.08) !important;
  min-height: auto !important;
  height: auto !important;
  align-self: start !important;
}

body.light-mode #contact .contact-card:hover {
  transform: translateY(-3px) scale(1) !important;
  border-color: rgba(72, 183, 140, 0.55) !important;
  background: #eef5f9 !important;
  box-shadow:
    0 0 0 1px rgba(72, 183, 140, 0.35),
    0 0 18px rgba(72, 183, 140, 0.28) !important;
}

body.light-mode #contact-form {
  margin-top: 52px !important;
}

/* Chatbot UI */
.chatbot-toggle {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 2500;
  border: 1px solid rgba(110, 255, 167, 0.62);
  background: linear-gradient(120deg, rgba(13, 30, 24, 0.98), rgba(27, 62, 44, 0.96), rgba(15, 34, 27, 0.98));
  background-size: 200% 200%;
  color: #e8fff1;
  border-radius: 999px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(110, 255, 167, 0.24);
  animation: askme-bounce 2.1s ease-in-out infinite, askme-glow 2.4s ease-in-out infinite, askme-gradient 4s ease-in-out infinite;
  overflow: visible;
  isolation: isolate;
}

.chatbot-toggle::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid rgba(110, 255, 167, 0.42);
  opacity: 0.75;
  z-index: -1;
  animation: askme-ring 2.2s ease-out infinite;
}

.chatbot-toggle::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(110, 255, 167, 0.24) 0%, rgba(110, 255, 167, 0) 70%);
  filter: blur(8px);
  z-index: -2;
  opacity: 0.55;
}

.chatbot-toggle:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.44), 0 0 22px rgba(110, 255, 167, 0.36);
}

.chatbot-toggle i {
  filter: drop-shadow(0 0 6px rgba(110, 255, 167, 0.45));
  animation: askme-icon 1.9s ease-in-out infinite;
}

.chatbot-toggle span {
  background: linear-gradient(90deg, #e7fff2 0%, #bfffdc 50%, #e7fff2 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: askme-text 2.8s ease-in-out infinite;
}

@keyframes askme-bounce {
  0%, 100% { transform: translateY(0); }
  15% { transform: translateY(-4px); }
  30% { transform: translateY(0); }
  45% { transform: translateY(-2px); }
  60% { transform: translateY(0); }
}

@keyframes askme-glow {
  0%, 100% {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(110, 255, 167, 0.2);
  }
  50% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), 0 0 18px rgba(110, 255, 167, 0.32);
  }
}

@keyframes askme-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes askme-ring {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.08); opacity: 0.05; }
  100% { transform: scale(1.08); opacity: 0; }
}

@keyframes askme-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px) rotate(-4deg); }
}

@keyframes askme-text {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.chatbot-panel {
  position: fixed;
  right: 18px;
  bottom: 74px;
  width: min(360px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 100px));
  z-index: 2600;
  border: 1px solid rgba(110, 255, 167, 0.32);
  border-radius: 14px;
  background: rgba(10, 16, 22, 0.96);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.44);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-panel.open {
  display: flex;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(110, 255, 167, 0.24);
}

.chatbot-header h3 {
  margin: 0;
  font-size: 15px;
  color: #dffff0;
}

.chatbot-close {
  border: none;
  background: transparent;
  color: #dffff0;
  font-size: 16px;
  cursor: pointer;
}

.chatbot-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatbot-message {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chatbot-message.user {
  align-self: flex-end;
  background: rgba(110, 255, 167, 0.14);
  border: 1px solid rgba(110, 255, 167, 0.35);
  color: #e7ffef;
}

.chatbot-message.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0f6ff;
}

.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px 2px;
}

.chatbot-chip {
  border: 1px solid rgba(110, 255, 167, 0.4);
  background: rgba(110, 255, 167, 0.1);
  color: #dffff0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}

.chatbot-chip:hover {
  background: rgba(110, 255, 167, 0.2);
}

.chatbot-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(110, 255, 167, 0.24);
}

.chatbot-form input {
  flex: 1;
  border-radius: 8px;
  border: 1px solid rgba(110, 255, 167, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f6ff;
  padding: 8px 10px;
}

.chatbot-form button {
  border: 1px solid rgba(110, 255, 167, 0.5);
  background: rgba(110, 255, 167, 0.16);
  color: #dffff0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

body.light-mode .chatbot-toggle {
  background: linear-gradient(135deg, #edf7f2, #dff4ea);
  color: #103a28;
  border-color: rgba(72, 183, 140, 0.62);
}

body.light-mode .chatbot-toggle::before {
  border-color: rgba(72, 183, 140, 0.5);
}

body.light-mode .chatbot-toggle span {
  background: linear-gradient(90deg, #1e5c40 0%, #2a7c57 50%, #1e5c40 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-reduced-motion: reduce) {
  .chatbot-toggle {
    animation: none !important;
  }
  .chatbot-toggle::before,
  .chatbot-toggle i,
  .chatbot-toggle span {
    animation: none !important;
  }
}

body.light-mode .chatbot-panel {
  background: rgba(244, 248, 252, 0.98);
  border-color: rgba(72, 183, 140, 0.38);
}

body.light-mode .chatbot-header h3,
body.light-mode .chatbot-close {
  color: #113424;
}

body.light-mode .chatbot-message.user {
  color: #143c2a;
}

body.light-mode .chatbot-message.bot {
  color: #1b2230;
  background: rgba(255, 255, 255, 0.86);
}

body.light-mode .chatbot-chip {
  color: #113a28;
  background: rgba(72, 183, 140, 0.14);
  border-color: rgba(72, 183, 140, 0.46);
}

body.light-mode .chatbot-form input {
  color: #1b2230;
  background: #ffffff;
  border-color: rgba(72, 183, 140, 0.4);
}

body.light-mode .chatbot-form button {
  color: #113424;
  background: rgba(72, 183, 140, 0.16);
}

body.light-mode .story-label {
  color: #5e728a;
}

body.light-mode .story-line {
  background: rgba(72, 183, 140, 0.11);
  border-color: rgba(72, 183, 140, 0.35);
}

body.light-mode .story-step {
  color: #6f8499;
}

body.light-mode .story-step.active {
  color: #1d5e43;
  text-shadow: none;
}

body.light-mode .story-step.done {
  color: #2c8a62;
}

@media (max-width: 620px) {
  .chatbot-toggle {
    right: 12px;
    bottom: 14px;
    padding: 9px 12px;
  }

  .chatbot-panel {
    right: 10px;
    bottom: 62px;
    width: calc(100vw - 20px);
    height: min(74vh, 560px);
  }
}

/* Chatbot UI Theme Refresh (easy to revert: remove this block) */
#chatbot-panel.chatbot-panel {
  border: 1px solid rgba(110, 255, 167, 0.42);
  background:
    radial-gradient(circle at 20% 0%, rgba(110, 255, 167, 0.08), transparent 46%),
    linear-gradient(160deg, rgba(8, 14, 20, 0.98), rgba(10, 18, 26, 0.96));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
}

#chatbot-panel .chatbot-header {
  background: linear-gradient(90deg, rgba(110, 255, 167, 0.11), rgba(110, 255, 167, 0.03));
  border-bottom: 1px solid rgba(110, 255, 167, 0.28);
}

#chatbot-panel .chatbot-header h3 {
  letter-spacing: 0.02em;
  font-weight: 700;
}

#chatbot-panel .chatbot-messages {
  gap: 10px;
  padding-top: 12px;
}

#chatbot-panel .chatbot-message.user {
  background: linear-gradient(135deg, rgba(110, 255, 167, 0.2), rgba(110, 255, 167, 0.12));
  border-color: rgba(110, 255, 167, 0.46);
}

#chatbot-panel .chatbot-message.bot {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

#chatbot-panel .chatbot-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  background: rgba(110, 255, 167, 0.14);
}

#chatbot-panel .chatbot-form {
  background: rgba(255, 255, 255, 0.02);
}

#chatbot-panel .chatbot-form input {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}

#chatbot-panel .chatbot-form button {
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110, 255, 167, 0.26), rgba(110, 255, 167, 0.12));
}

body.light-mode #chatbot-panel.chatbot-panel {
  background:
    radial-gradient(circle at 20% 0%, rgba(72, 183, 140, 0.1), transparent 46%),
    linear-gradient(165deg, rgba(245, 250, 247, 0.98), rgba(238, 246, 242, 0.97));
  border-color: rgba(72, 183, 140, 0.48);
  box-shadow: 0 20px 40px rgba(24, 49, 37, 0.16);
}

body.light-mode #chatbot-panel .chatbot-header {
  background: linear-gradient(90deg, rgba(72, 183, 140, 0.12), rgba(72, 183, 140, 0.02));
}

body.light-mode #chatbot-panel .chatbot-message.bot {
  background: rgba(255, 255, 255, 0.88);
}









/* Desktop polish: curved edges and soft shadows */
.hero {
  border-radius: 24px;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.skills-box,
.resume-box,
.service-card,
.cert-card,
.project-tile,
.contact-card {
  border-radius: 18px;
}

.skills-box,
.resume-box {
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.24),
    0 2px 8px rgba(0, 0, 0, 0.12);
}

.photo-wrapper.option1 img {
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.30);
}

body.light-mode .hero {
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(238, 244, 242, 0.92)) !important;
  border: 1px solid rgba(72, 183, 140, 0.20) !important;
  box-shadow:
    0 18px 34px rgba(26, 35, 42, 0.14),
    0 6px 16px rgba(26, 35, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.light-mode .skills-box,
body.light-mode .resume-box {
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.96), rgba(241, 246, 248, 0.94)) !important;
  border-color: rgba(72, 183, 140, 0.20) !important;
  box-shadow:
    0 14px 26px rgba(25, 38, 48, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

body.light-mode .photo-wrapper.option1 img {
  box-shadow: 0 16px 34px rgba(20, 28, 36, 0.18);
}

/* Final light-mode pass: make all card-like boxes consistently curved */
body.light-mode .skills-box,
body.light-mode .resume-box,
body.light-mode .service-card,
body.light-mode .project-tile,
body.light-mode .cert-card,
body.light-mode .contact-card,
body.light-mode .contact-form,
body.light-mode #chatbot-panel.chatbot-panel {
  border-radius: 22px !important;
}

/* Overrides earlier light-mode contact-card square reset */
body.light-mode #contact .contact-card {
  border-radius: 22px !important;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea,
body.light-mode .chatbot-form input,
body.light-mode .chatbot-message,
body.light-mode .chatbot-chip {
  border-radius: 16px !important;
}

body.light-mode .contact-form button,
body.light-mode .project-toggle-btn,
body.light-mode .chatbot-form button {
  border-radius: 999px !important;
}

body.light-mode .section {
  border-radius: 24px !important;
}

/* Remove outer panel box for selected sections in light mode */
body.light-mode #about,
body.light-mode #education-experience,
body.light-mode #services,
body.light-mode #contact,
body.light-mode #portfolio,
body.light-mode #certifications {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.light-mode #about.section-in-view,
body.light-mode #education-experience.section-in-view,
body.light-mode #services.section-in-view,
body.light-mode #contact.section-in-view,
body.light-mode #portfolio.section-in-view,
body.light-mode #certifications.section-in-view {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* White theme: make headings high-contrast on light background */
body.light-mode .section-title,
body.light-mode .section-title-left,
body.light-mode #contact h2,
body.light-mode #portfolio h2,
body.light-mode #certifications h2,
body.light-mode #contact-form h2,
body.light-mode .column-title,
body.light-mode .sub-heading,
body.light-mode .timeline-content h3,
body.light-mode .service-card h3,
body.light-mode .cert-card h3,
body.light-mode .contact-card h3 {
  color: #111 !important;
  -webkit-text-stroke: 0 !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}

/* Match dark theme: remove outer panel box for the same sections */
body.dark-mode #about,
body.dark-mode #education-experience,
body.dark-mode #services,
body.dark-mode #contact,
body.dark-mode #portfolio,
body.dark-mode #certifications {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.dark-mode #about.section-in-view,
body.dark-mode #education-experience.section-in-view,
body.dark-mode #services.section-in-view,
body.dark-mode #contact.section-in-view,
body.dark-mode #portfolio.section-in-view,
body.dark-mode #certifications.section-in-view {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Resume tilt interaction: remove transform transition lag while JS drives tilt */
.edu-exp-two-col .resume-box.is-tilting {
  transition-property: box-shadow, border-color !important;
  transform-style: preserve-3d;
}

/* Hex background particle merge effect (dark theme) */
.hex-particle-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hex-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

.hex-particle--white {
  background: rgba(243, 252, 248, 0.95);
  box-shadow:
    0 0 0 2px rgba(243, 252, 248, 0.14),
    0 0 18px rgba(243, 252, 248, 0.75),
    0 0 36px rgba(243, 252, 248, 0.22);
}

.hex-particle--orange {
  background: rgba(255, 158, 76, 0.95);
  box-shadow:
    0 0 0 2px rgba(255, 158, 76, 0.14),
    0 0 18px rgba(255, 158, 76, 0.85),
    0 0 38px rgba(255, 158, 76, 0.22);
}

.hex-particle--target {
  width: 10px;
  height: 10px;
  opacity: 0.85;
}

.hex-particle--anchor {
  width: 11px;
  height: 11px;
  opacity: 0.95;
  box-shadow:
    0 0 0 2px rgba(255, 158, 76, 0.2),
    0 0 24px rgba(255, 158, 76, 0.95),
    0 0 56px rgba(255, 158, 76, 0.26);
}

.hex-particle--precharge {
  animation: hexParticlePrecharge 420ms ease-in-out infinite alternate;
}

.hex-particle--merged {
  background: rgba(249, 253, 250, 0.98);
  box-shadow:
    0 0 0 2px rgba(249, 253, 250, 0.22),
    0 0 34px rgba(249, 253, 250, 1),
    0 0 74px rgba(249, 253, 250, 0.42),
    0 0 118px rgba(249, 253, 250, 0.2),
    0 0 96px rgba(255, 158, 76, 0.18);
  animation: hexTargetPulse 1.7s ease-in-out infinite;
}

.hex-edge-glow {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  border-radius: 999px;
  transform-origin: 0 50%;
  opacity: 0;
  will-change: width, transform, opacity;
  backface-visibility: hidden;
}

.hex-edge-glow--white {
  background: linear-gradient(
    90deg,
    rgba(243, 252, 248, 0.02) 0%,
    rgba(243, 252, 248, 0.05) 52%,
    rgba(243, 252, 248, 0.16) 74%,
    rgba(243, 252, 248, 0.42) 90%,
    rgba(243, 252, 248, 0.98) 100%
  );
  box-shadow:
    0 0 5px rgba(243, 252, 248, 0.1),
    0 0 18px rgba(243, 252, 248, 0.1);
}

.hex-edge-glow--orange {
  background: linear-gradient(
    90deg,
    rgba(255, 158, 76, 0.02) 0%,
    rgba(255, 158, 76, 0.06) 52%,
    rgba(255, 158, 76, 0.16) 74%,
    rgba(255, 158, 76, 0.38) 90%,
    rgba(255, 158, 76, 0.98) 100%
  );
  box-shadow:
    0 0 5px rgba(255, 158, 76, 0.1),
    0 0 18px rgba(255, 158, 76, 0.1);
}

.hex-edge-glow--merge-bloom {
  height: 2px;
  filter: saturate(1.03);
}

.hex-edge-glow--merge-bloom.hex-edge-glow--white {
  background: linear-gradient(
    90deg,
    rgba(243, 252, 248, 0.00) 0%,
    rgba(243, 252, 248, 0.03) 38%,
    rgba(243, 252, 248, 0.10) 66%,
    rgba(243, 252, 248, 0.24) 86%,
    rgba(243, 252, 248, 0.46) 100%
  );
  box-shadow:
    0 0 6px rgba(243, 252, 248, 0.12),
    0 0 14px rgba(243, 252, 248, 0.08),
    0 0 26px rgba(243, 252, 248, 0.04);
}

@keyframes hexParticlePrecharge {
  from {
    opacity: 0.75;
    filter: brightness(0.95);
  }
  to {
    opacity: 1;
    filter: brightness(1.2);
  }
}

@keyframes hexTargetPulse {
  0%, 100% {
    opacity: 0.9;
    filter: blur(0);
  }
  50% {
    opacity: 1;
    filter: blur(0.18px) brightness(1.08);
  }
}

body.light-mode .hex-particle-layer {
  display: none;
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .hex-particle-layer {
    display: none;
  }
}
