/* ==========================================================
   PART 1: GLOBAL RESET + THEME BASE (DARK & LIGHT MODE)
========================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: #000000;
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
}

body.light-mode {
  background: #ffffff;
  color: #000000;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

h1, h2, h3, h4, h5, h6, p, span, small, label {
  color: inherit;
}

/* ==========================================================
   PART 2: HERO SECTION + PROFILE PHOTO
========================================================== */

#hero {
  padding: 80px 20px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.profile {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 25px;
  border: 4px solid transparent;
  background-image: linear-gradient(#000, #000),
                    linear-gradient(90deg, #00f2ff, #00ff99);
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.4);
  transition: transform 0.4s ease;
}

.profile:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(0, 242, 255, 0.6);
}

.profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#hero h2 {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

#hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #00f2ff, #00ff99);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 600px;
}

/* Light mode adjustments for Hero */
body.light-mode #hero h1 {
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================
   PART 3: SKILL PILLS + INFO CARDS
========================================================== */

/* Hero Skill Pills */
.hero-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 0 18px;
}

.skill-pill {
  background: rgba(0, 242, 255, 0.1);
  border: 0px solid rgba(0, 242, 255, 0.3);
  padding: 8px 18px;
  border-radius: 18px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #00f2ff;
  transition: all 0.3s ease;
}

.skill-pill:hover {
  background: #00f2ff;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
  transform: translateY(-3px);
}

/* Info Cards Layout */
.card {
  background: #111;
  border: 0px solid #222;
  padding: 25px;
  border-radius: 15px;
  margin: 20px auto;
  max-width: 800px;
  width: 90%;
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #00f2ff;
}

.card b {
  color: #00f2ff;
  font-size: 1.1rem;
  display: inline-block;
  margin-bottom: 5px;
}

.card small {
  display: block;
  margin-top: 8px;
  opacity: 0.6;
  font-style: italic;
}

/* Light Mode for Pills and Cards */
body.light-mode .skill-pill {
  background: rgba(0, 114, 255, 0.05);
  border: 0px solid rgba(0, 114, 255, 0.2);
  color: #0072ff;
}

body.light-mode .skill-pill:hover {
  color: #fff;
}

body.light-mode .card {
  background: #f9f9f9;
  border-color: #eee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-mode .card b {
  color: #0072ff;
}

/* ==========================================================
   PART 4: SECTION HEADLINES + HOBBY/SKILL WRAPPERS
========================================================== */

.section-headline {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 600;
  margin: 60px 0 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  background: linear-gradient(90deg, #00f2ff, #00ff99);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Underline effect for headlines */
.section-headline::after {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #00f2ff, #00ff99);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Layout for Hobbies/Skills/Interests */
.hobbies-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 900px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.hobby-pill {
  background: #111;
  border: 0px solid #40E;
  padding: 12px 25px;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.hobby-pill:hover {
  border-color: #00ff99;
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 255, 153, 0.3);
}

/* Light mode adjustments */
body.light-mode .section-headline {
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .section-headline::after {
  background: linear-gradient(90deg, #0072ff, #00c6ff);
}

body.light-mode .hobby-pill {
  background: #ffffff;
  border-color: #eee;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.light-mode .hobby-pill:hover {
  border-color: #0072ff;
  color: #0072ff;
}

/* ==========================================================
   PART 5: ABOUT ME SECTION + PROJECT GRID
========================================================== */

.about-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px;
  gap: 20px;
}

.about-photo {
  width: 250px;
  height: 250px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
  margin-bottom: 10px;
}

.about-text {
  font-size: 1.05rem;
  color: #ccc;
  max-width: 700px;
  margin: 20px 15px;
}

/* Specific Neon Border for About Section */
.neon-border {
  border: 1px solid transparent;
  background-image: linear-gradient(#111, #111),
                    linear-gradient(90deg, #00f2ff, #00ff99);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

/* Projects Grid System */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

/* Light mode adjustments */
body.light-mode .about-text {
  color: #444;
}

body.light-mode .neon-border {
  background-image: linear-gradient(#ffffff, #ffffff),
                    linear-gradient(90deg, #0072ff, #00c6ff);
}

/* ==========================================================
   PART 6: PROJECT CARDS + IMAGE WRAPPERS
========================================================== */

/* ── Project Card Base ── */
.project-card {
  background: #111;
  border-radius: 18px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;

  /* Animated neon gradient border */
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 1.5px transparent;

  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease;
}

/* Animated rainbow border via ::before pseudo */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1.5px;
  background: linear-gradient(135deg, #00f2ff, #00ff99, #ff00ff, #00f2ff);
  background-size: 300% 300%;
  animation: cardBorderSpin 4s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 0;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

@keyframes cardBorderSpin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hover: card lifts + border blazes */
.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 8px 30px rgba(0, 242, 255, 0.25),
    0 0 60px rgba(0, 255, 153, 0.1);
}

.project-card:hover::before {
  opacity: 1;
  animation-duration: 1.5s;
}

/* ── Image Wrapper — collapsed state ── */
.project-image-wrapper {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;

  /* Neon frame around image */
  border: 1.5px solid rgba(0, 242, 255, 0.25);
  box-shadow:
    0 0 12px rgba(0, 242, 255, 0.15),
    inset 0 0 8px rgba(0, 242, 255, 0.05);

  transition:
    height 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

/* Hover image wrapper — border brightens */
.project-card:hover .project-image-wrapper {
  border-color: rgba(0, 242, 255, 0.6);
  box-shadow:
    0 0 20px rgba(0, 242, 255, 0.3),
    inset 0 0 12px rgba(0, 242, 255, 0.08);
}

/* ── Image itself ── */
.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease;
}

/* Hover: subtle zoom + sharpen */
.project-card:hover .project-image {
  transform: scale(1.04);
  filter: brightness(1.08) saturate(1.1);
}

/* ── Expanded state ── */
.project-image-wrapper.expanded {
  height: auto;
  border-color: #00f2ff;
  box-shadow:
    0 0 30px rgba(0, 242, 255, 0.45),
    0 0 60px rgba(0, 255, 153, 0.15),
    inset 0 0 15px rgba(0, 242, 255, 0.1);
  animation: expandGlow 0.65s ease forwards;
}

@keyframes expandGlow {
  0%   { box-shadow: 0 0 10px rgba(0, 242, 255, 0.2); }
  50%  { box-shadow: 0 0 50px rgba(0, 242, 255, 0.6), 0 0 80px rgba(0, 255, 153, 0.25); }
  100% { box-shadow: 0 0 30px rgba(0, 242, 255, 0.45), 0 0 60px rgba(0, 255, 153, 0.15); }
}

.project-image-wrapper.expanded .project-image {
  object-fit: contain;
  object-position: center;
  transform: scale(1);
  filter: brightness(1.05);
  animation: imageReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes imageReveal {
  from {
    opacity: 0.4;
    transform: scale(0.97);
    filter: brightness(0.8) blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.05) blur(0px);
  }
}

/* ── Collapse: smooth shrink back ── */
.project-image-wrapper:not(.expanded) {
  animation: collapseGlow 0.5s ease forwards;
}

@keyframes collapseGlow {
  from { box-shadow: 0 0 30px rgba(0, 242, 255, 0.4); }
  to   { box-shadow: 0 0 12px rgba(0, 242, 255, 0.15); }
}

/* ── Card text ── */
.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #00f2ff;
  position: relative;
  z-index: 1;
  transition: text-shadow 0.3s ease;
}

.project-card:hover h3 {
  text-shadow: 0 0 12px rgba(0, 242, 255, 0.5);
}

.project-card p {
  font-size: 0.95rem;
  color: #bbb;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

/* ── Tech used tag ── */
.tech-used {
  font-size: 0.85rem;
  background: rgba(0, 255, 153, 0.06);
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid #00ff99;
  position: relative;
  z-index: 1;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover .tech-used {
  background: rgba(0, 255, 153, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.15);
}

/* ── Light mode adjustments ── */
body.light-mode .project-card {
  background: #ffffff;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
}

body.light-mode .project-card::before {
  background: linear-gradient(135deg, #0072ff, #00c6ff, #7a00ff, #0072ff);
  background-size: 300% 300%;
  opacity: 0.5;
}

body.light-mode .project-card:hover::before {
  opacity: 1;
}

body.light-mode .project-card:hover {
  box-shadow:
    0 8px 30px rgba(0, 114, 255, 0.2),
    0 0 40px rgba(0, 198, 255, 0.1);
}

body.light-mode .project-image-wrapper {
  border-color: rgba(0, 114, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 114, 255, 0.1);
}

body.light-mode .project-card:hover .project-image-wrapper {
  border-color: rgba(0, 114, 255, 0.5);
  box-shadow: 0 0 18px rgba(0, 114, 255, 0.25);
}

body.light-mode .project-image-wrapper.expanded {
  border-color: #0072ff;
  box-shadow:
    0 0 25px rgba(0, 114, 255, 0.4),
    0 0 50px rgba(0, 198, 255, 0.15);
}

body.light-mode .project-card h3 {
  color: #0072ff;
}

body.light-mode .project-card:hover h3 {
  text-shadow: 0 0 10px rgba(0, 114, 255, 0.3);
}

body.light-mode .project-card p {
  color: #555;
}

body.light-mode .tech-used {
  background: #f0f7ff;
  color: #333;
  border-left-color: #0072ff;
}

/* ==========================================================
   PART 7: PROJECT ACTION BUTTONS + HIGHLIGHT EFFECTS
========================================================== */

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  padding-top: 20px;
}

.highlight-btn {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 10px 5px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #00f2ff;
  border: 0px solid rgba(0, 242, 255, 0.4);
  background: rgba(0, 242, 255, 0.05);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.highlight-btn:hover {
  background: #00f2ff;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
}

.highlight-btn i {
  font-size: 0.9rem;
}

/* Light mode adjustments */
body.light-mode .highlight-btn {
  color: #0072ff;
  border-color: rgba(0, 114, 255, 0.3);
  background: rgba(0, 114, 255, 0.02);
}

body.light-mode .highlight-btn:hover {
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 114, 255, 0.3);
}

/* ==========================================================
   PART 8: CERTIFICATE GRID + RESUME ACTIONS
========================================================== */

/* Reuse grid logic for certificates */
.projects-grid.reveal {
  margin-top: 20px;
}

/* Certificate specific card styling */
.project-card img {
  border-radius: 10px;
  margin-bottom: 15px;
  border: 0px solid rgba(255, 255, 255, 0.1);
}

/* Resume Section Container */
.resume-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 40px 0 80px;
}

/* Base Resume Button Styling */
.resume-btn {
  padding: 12px 35px;
  border-radius: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-size: 1rem;
}

/* View Button - Neon Blue */
.view-btn {
  border: 0px solid #00f2ff;
  color: #00f2ff;
  background: rgba(0, 242, 255, 0.05);
}

.view-btn:hover {
  background: #00f2ff;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

/* Download Button - Neon Green */
.download-btn {
  border: 0px solid #00ff99;
  color: #00ff99;
  background: rgba(0, 255, 153, 0.05);
}

.download-btn:hover {
  background: #00ff99;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 153, 0.4);
}

/* Light mode adjustments for Resume */
body.light-mode .view-btn {
  border-color: #0072ff;
  color: #0072ff;
}

body.light-mode .view-btn:hover {
  background: #0072ff;
  color: #fff;
}

body.light-mode .download-btn {
  border-color: #00a86b;
  color: #00a86b;
}

body.light-mode .download-btn:hover {
  background: #00a86b;
  color: #fff;
}

/* ==========================================================
   PART 9: CONTACT SECTION + SOCIAL ICONS
========================================================== */

.contact-section {
  padding: 80px 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
}

/* Info Cards (Email, Phone, Location) */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.contact-card {
  background: #111;
  padding: 20px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  border: 1px solid #222;
  transition: border-color 0.3s ease;
}

.contact-card:hover {
  border-color: #00f2ff;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 242, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f2ff;
  font-size: 1.2rem;
}

.contact-card h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.contact-card p {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Social Media Icons */
.contact-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.contact-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  color: #fff;
}

.contact-social a:hover {
  color: #00f2ff;
  border-color: #00f2ff;
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

/* Light mode adjustments */
body.light-mode .contact-card {
  background: #f9f9f9;
  border-color: #eee;
}

body.light-mode .contact-icon {
  background: rgba(0, 114, 255, 0.1);
  color: #0072ff;
}

body.light-mode .contact-social a {
  background: #fff;
  border-color: #eee;
  color: #333;
}

body.light-mode .contact-social a:hover {
  color: #0072ff;
  border-color: #0072ff;
}

/* ==========================================================
   PART 10: CONTACT FORM STYLING
========================================================== */

.contact-form {
  background: #111;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid #222;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #00f2ff;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 25px;
  background: #080808;
  border: 0px solid #333;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00f2ff;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
  outline: none;
}

.send-btn {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  background: linear-gradient(90deg, #00f2ff, #00ff99);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.send-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 242, 255, 0.4);
}

/* Light mode adjustments for the form */
body.light-mode .contact-form {
  background: #ffffff;
  border-color: #eee;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.light-mode .contact-form label {
  color: #0072ff;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  background: #fdfdfd;
  border-color: #ddd;
  color: #333;
}

body.light-mode .send-btn {
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  color: #fff;
}

/* ==========================================================
   PART 11: PROJECT MODAL (DETAILS & CODE VIEW)
========================================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  overflow-y: auto;
}

.modal-content {
  background-color: #111;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #333;
  width: 90%;
  max-width: 800px;
  border-radius: 15px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #ff4d4d;
}

#modalTitle {
  margin-bottom: 20px;
  color: revert;
  font-size: 1.8rem;
}

/* Copy Button inside Modal */
.copy-btn {
  background: #00f2ff;
  color: #000;
  padding: 8px 15px;
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  display: none;
}

/* Modal Body / Code Content */
#modalBody {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.7;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 10px;
}

/* Scrollbar style */
#modalBody::-webkit-scrollbar {
  width: 6px;
}

#modalBody::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 255, 0.4);
  border-radius: 10px;
}

/* Prism.js code block custom padding */
pre[class*="language-"] {
  margin: 0 !important;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Light mode adjustments for Modal */
body.light-mode .modal {
  background: rgba(255, 255, 255, 0.8);
}

body.light-mode .modal-content {
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.light-mode #modalBody {
  color: black;
}

body.light-mode #modalBody pre {
  background: rgba(0, 0, 0, 0.08);
}

body.light-mode .close-btn {
  color: #000000;
}

/* ==========================================================
   MODAL SUB HEADINGS (h1–h5)
========================================================== */

#modalBody h1,
#modalBody h2,
#modalBody h3,
#modalBody h4,
#modalBody h5 {
  margin-top: 18px;
  margin-bottom: 10px;
  font-weight: 700;
  background: linear-gradient(90deg, #00f2ff, #8f00ff, #00ff99);
  background-size: 300% 300%;
  animation: subtitleGlow 4s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes subtitleGlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ==========================================================
   LIST STYLE (STAR BULLETS)
========================================================== */

#modalBody ul {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

#modalBody ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  line-height: 1.6;
}

#modalBody ul li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 14px;
  color: blue;
}

/* ==========================================================
   CODE BOX STYLE
========================================================== */

#modalBody pre {
  padding: 15px;
  border-radius: 15px;
  overflow-x: auto;
  font-size: x-small;
}

/* ==========================================================
   PART 12: THEME TOGGLE BUTTON + RAINBOW ANIMATION
========================================================== */

.theme-toggle {
  position: fixed;
  top: 30px;
  left: 30px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;

  /* Animated Rainbow Border */
  border: 1px solid transparent;
  background-image:
    linear-gradient(#000000, #000000),
    linear-gradient(90deg, #00c6ff, #00ff99, #ff00ff, #00c6ff);
  background-origin: border-box;
  background-clip: content-box, border-box;
  background-size: 300% 100%;
  animation: rainbow-border 4s linear infinite;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

@keyframes rainbow-border {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.theme-toggle:hover {
  transform: scale(1.12);
  box-shadow: 0 0 18px rgba(0, 242, 255, 0.55),
              0 0 28px rgba(255, 0, 255, 0.25);
}

/* Light mode adjustments for the toggle */
body.light-mode .theme-toggle {
  color: #000000;
  background-image:
    linear-gradient(#ffffff, #ffffff),
    linear-gradient(90deg, #00c6ff, #7a00ff, #00ff99, #00c6ff);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================
   PART 13: SCROLL REVEAL ANIMATIONS
========================================================== */

/* ── Base hidden state (default: slide up) ── */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

/* ── Directional variants ── */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.reveal-fade {
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

/* ── Active / visible state for all variants ── */
.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active,
.reveal-fade.active {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
  pointer-events: auto;
}

/* ── Stagger delay helpers ── */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ── Cards: slide up with subtle spring ── */
.card {
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* ── Hobby / skill pills: pop in with bounce ── */
.hobby-pill,
.skill-pill {
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              box-shadow 0.3s ease,
              color 0.3s ease;
}

/* ── Project cards: slide up staggered ── */
.project-card {
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.projects-grid .project-card:nth-child(1) { transition-delay: 0s;    }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.12s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.24s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.36s; }

/* ── Contact cards: staggered slide in ── */
.contact-card {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
}

.contact-cards .contact-card:nth-child(1) { transition-delay: 0s;    }
.contact-cards .contact-card:nth-child(2) { transition-delay: 0.15s; }
.contact-cards .contact-card:nth-child(3) { transition-delay: 0.3s;  }

/* ── Social icons: pop in staggered ── */
.contact-social a {
  transition: color 0.3s ease, border-color 0.3s ease,
              transform 0.3s ease, box-shadow 0.3s ease,
              opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-social a:nth-child(1) { transition-delay: 0s;    }
.contact-social a:nth-child(2) { transition-delay: 0.07s; }
.contact-social a:nth-child(3) { transition-delay: 0.14s; }
.contact-social a:nth-child(4) { transition-delay: 0.21s; }
.contact-social a:nth-child(5) { transition-delay: 0.28s; }
.contact-social a:nth-child(6) { transition-delay: 0.35s; }

/* ── Section headline underline sweep animation ── */
.section-headline::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #00f2ff, #00ff99);
  margin: 10px auto 0;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.section-headline.active::after {
  width: 60px;
}

/* ── Resume buttons: slide up pair ── */
.resume-btn {
  transition: all 0.3s ease,
              opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.resume-actions .view-btn     { transition-delay: 0s;    }
.resume-actions .download-btn { transition-delay: 0.15s; }

/* ── Highlight buttons inside project cards ── */
.highlight-btn {
  transition: background 0.3s ease, color 0.3s ease,
              box-shadow 0.3s ease,
              opacity 0.5s ease, transform 0.5s ease;
}

.project-actions .highlight-btn:nth-child(1) { transition-delay: 0.05s; }
.project-actions .highlight-btn:nth-child(2) { transition-delay: 0.12s; }
.project-actions .highlight-btn:nth-child(3) { transition-delay: 0.19s; }

/* ── Reduced motion: respect accessibility preference ── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .reveal-fade,
  .card,
  .project-card,
  .contact-card,
  .hobby-pill,
  .skill-pill,
  .resume-btn,
  .highlight-btn,
  .contact-social a {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .section-headline::after {
    width: 60px;
    transition: none !important;
  }
}

/* ==========================================================
   PART 14: RESPONSIVE MEDIA QUERIES (MOBILE FIXES)
========================================================== */

@media (max-width: 768px) {
  #hero h1 {
    font-size: 2.2rem;
  }

  .section-headline {
    font-size: 1.8rem;
  }

  .about-card {
    padding: 0px;
  }

  .about-photo {
    width: 230px;
    height: 230px;
  }

  .contact-form {
    padding: 25px;
  }

  .resume-actions {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .resume-btn {
    width: 45%;
    justify-content: center;
  }

  .theme-toggle {
    width: 30px;
    height: 30px;
    top: 2px;
    left: 5px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.8rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   NEON ANIMATED THIN BORDER (GLOBAL USE)
========================================================== */

.neon-animated-border {
  position: relative;
  border-radius: 18px;
  overflow: visible;
  z-index: 1;
}

.neon-animated-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 18px;

  background: linear-gradient(90deg, #00f2ff, #00ff99, #ff00ff, #00f2ff);
  background-size: 300% 100%;
  animation: neonBorderMove 3s linear infinite;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  z-index: -1;
}

@keyframes neonBorderMove {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Light mode version */
body.light-mode .neon-animated-border::before {
  background: linear-gradient(90deg, #0072ff, #00c6ff, #7a00ff, #0072ff);
  background-size: 300% 100%;
}

/* ==========================================================
   PRISM.JS SYNTAX HIGHLIGHTING OVERRIDES
========================================================== */

code[class*="language-"],
pre[class*="language-"] {
  color: revert;
  background: 0 0;
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 1em;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre[class*="language-"] {
  padding: 1em;
  margin: 0.5em 0;
  overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
  background: #2d2d2d;
}

:not(pre) > code[class*="language-"] {
  padding: 0.1em;
  border-radius: 0.3em;
  white-space: normal;
}

.token.block-comment,
.token.cdata,
.token.comment,
.token.doctype,
.token.prolog {
  color: #999;
}

.token.punctuation {
  color: #ccc;
}

.token.attr-name,
.token.deleted,
.token.namespace,
.token.tag {
  color: #e2777a;
}

.token.function-name {
  color: #6196cc;
}

.token.boolean,
.token.function,
.token.number {
  color: #f08d49;
}

.token.class-name,
.token.constant,
.token.property,
.token.symbol {
  color: #f8c555;
}

.token.atrule,
.token.builtin,
.token.important,
.token.keyword,
.token.selector {
  color: #cc99cd;
}

.token.attr-value,
.token.char,
.token.regex,
.token.string,
.token.variable {
  color: #7ec699;
}

.token.entity,
.token.operator,
.token.url {
  color: #67cdcc;
}

.token.bold,
.token.important {
  font-weight: 700;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.inserted {
  color: green;
}
