/* Root Variables & Theme Setup   */
:root {
  --bg-color: #031e42;
  --text-color: #f5f7fa;
  --accent-color: #4078c0;  
  --hover-accent: #305c90;
  --white: #ffffff;
  --card-bg: #2d2d2d;
  --scroll-thumb: #b0bec5;
  --scroll-track: #e2e6ea;
  --footer-bg: #121212;
  --border-color: #ccc;
  --tag-bg: #e3e9f0;
  --skill-bg: #e0e0e0;
  --highlight: #ff854b;
  --code-bg: #f0f2f5;
  --timeline-line: #000000;
  --footer-text: #777;
  --nav-active: #1e90ff;
}

/* Light Theme Overrides */
body.light-theme {
  --bg-color: #f5f7fa;
  --text-color: #1a1a1a;
  --card-bg: #ffffff;
  --footer-bg: #eaeaea;
  --timeline-line: #000000;
}

/*  Reset  */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/*  Preloader  */
#preloader {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}

#preloader.fade {
  opacity: 0.2;
}

#preloader.hide {
  display: none;
}

#preloader .ball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-color);
  animation: bounce 1s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* Scrollbar Custom  */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 4px;
}

/* Global Utility Classes  */
.section-title {
  text-align: center;
  font-size: 2rem;
  margin: 3rem 0 2rem;
  color: var(--text-color);
}

.accent {
  color: var(--highlight);
}

/*  Navbar & Header  */
#page-header {
  width: 100%;
  background-color: var(--card-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background 0.3s;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--highlight);
}
.logo span {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-menu li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--nav-active);
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-color);
  cursor: pointer;
  margin-left: 1rem;
  transition: transform 0.3s;
}

#theme-toggle:hover {
  transform: rotate(20deg);
}

/* Hamburger Menu (Mobile Only)  */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  position: fixed;
  top: 65px;
  right: 0;
  background-color: var(--card-bg);
  width: 70%;
  max-width: 300px;
  padding: 1rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.mobile-nav.hidden {
  transform: translateX(100%);
}

.mobile-nav li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1rem;
}

/* Hero Section  */
#hero {
  padding: 7rem 2rem 3rem;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1100px;
  width: 100%;
}

.hero-left {
  flex: 1 1 500px;
  padding: 1rem;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.hero-typewriter {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.btn-glow {
  padding: 0.8rem 1.5rem;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 0 12px var(--accent-color);
  transition: background 0.3s, transform 0.2s;
}

.btn-glow:hover {
  background-color: var(--hover-accent);
  transform: translateY(-2px);
}

.hero-right {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.hero-image-wrapper {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 100%;
  object-fit: cover;
}

/* Cursor blink */
.cursor {
  animation: blink 1s step-start infinite;
  color: var(--accent-color);
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Skills Section  */
#skills {
  padding: 5rem 2rem;
  background: var(--bg-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-item {
  background-color: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background 0.3s;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-name {
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 12px;
  background: var(--skill-bg);
  border-radius: 6px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background: #5da66b;
  transition: width 0.4s ease-in-out;
}

/* Projects Section  */
#projects {
  padding: 5rem 2rem;
  background-color: var(--bg-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  perspective: 1200px;
  border-radius: 12px;
}

.card-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.project-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  background-color: var(--card-bg);
  color: var(--text-color);
  border-radius: 12px;
  backface-visibility: hidden;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.card-front {
  position: relative;
  z-index: 2;
  text-align: center;
}

.card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.project-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  object-fit: cover;
  height: 180px;
}

.project-link {
  margin-top: 1rem;
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.project-link:hover {
  background-color: var(--hover-accent);
}

/* Main Experience Section */
#exp-section {
  padding: 5rem 2rem;
  background-color: var(--bg-color);
  line-height: 1.6;
}

.exp-timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 20px;
}

.exp-timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-color);
}

.exp-entry {
  position: relative;
  margin: 2rem 0;
  padding-left: 3rem;
}

.exp-entry::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  left: -8px;
  width: 16px;
  height: 16px;
  background: var(--highlight);
  border-radius: 50%;
  border: 3px solid var(--bg-color);
}

.exp-box {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.exp-box:hover {
  transform: translateY(-4px);
}

.exp-title {
  font-size: 1.4rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.exp-org,
.exp-duration,
.exp-location {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text-color);
  opacity: 0.9;
}

.exp-view-btn {
  margin-top: 0.8rem;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 133, 75, 0.85); 
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.exp-view-btn:hover {
  background-color: var(--highlight-dark);
}

/* Modal Overlay */
.exp-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 2rem;
}

.exp-modal.active {
  display: flex;
}

.exp-modal-content {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 2rem;
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.3s ease-in-out;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exp-close-btn {
  position: absolute;
  top: 15px;
  right: 18px;
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--highlight);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.exp-close-btn:hover {
  transform: scale(1.2);
}

.exp-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--highlight);
  margin-bottom: 0.3rem;
}

.exp-modal-sub {
  font-size: 0.92rem;
  opacity: 0.8;
  margin-bottom: 1.2rem;
}

.exp-modal-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.7rem 0;
}

.exp-subhead {
  color: var(--accent-color)
}

.exp-modal-content ul {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
  list-style: disc;
}

.exp-modal-content li {
  margin-bottom: 0.5rem;
  font-size: 0.96rem;
}

.exp-media {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.exp-media img {
  max-width: 100%;
  border-radius: 10px;
  border: 2px solid var(--highlight);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.exp-media a {
  color: var(--highlight);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.exp-media a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .exp-modal-content {
    padding: 1.5rem;
  }

  .exp-title {
    font-size: 1.2rem;
  }

  .exp-modal-title {
    font-size: 1.3rem;
  }

  .exp-media a {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  #exp-section {
    padding: 3rem 1rem;
  }

  .exp-box {
    padding: 1.2rem;
  }

  .exp-modal-content {
    padding: 1.2rem;
    max-height: 85vh;
  }

  .exp-close-btn {
    font-size: 1.4rem;
  }
}

.exp-modal[aria-hidden="true"] {
  display: none;
}

.exp-modal a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.exp-modal a:hover {
  color: var(--highlight);
}

/* Education Section  */
#education {
  padding: 5rem 2rem;
  background-color: var(--bg-color);
}

.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 20px;
}

.timeline-container::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-color);
}

.timeline-item {
  position: relative;
  margin: 2rem 0;
  padding-left: 3rem;
}

.timeline-item.left::before,
.timeline-item.right::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  left: -8px;
  width: 16px;
  height: 16px;
  background: var(--highlight);
  border-radius: 50%;
  border: 3px solid var(--bg-color);
}

.timeline-content {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.timeline-content h3 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 0.4rem;
}

.edu-board,
.edu-grade {
  font-size: 0.95rem;
  color: var(--text-color);
}

/*  🧾 Certificates Section  */
#certificates {
  padding: 5rem 2rem;
  background: var(--bg-color);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.cert-card {
  background-color: var(--card-bg);
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

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

.cert-card h3 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.cert-provider {
  font-size: 0.9rem;
  color: var(--text-color);
}

.cert-link {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.cert-link:hover {
  background-color: var(--hover-accent);
}

.more-certs {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.more-certs.show {
  display: grid;
  opacity: 1;
}

/*  Glass eff */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
body.light-theme .glass {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #dcdcdc;
  backdrop-filter: blur(6px);
}

/*  Contact Section  */
#contact {
  background: var(--bg-color);
  padding: 5rem 2rem;
}

.contact-wrapper {
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.contact-left,
.contact-right {
  flex: 1 1 480px;
}

.contact-left h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.cp-title {
  color: 00b894;
  margin-bottom: 1rem;
}

.contact-left p {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 0.6rem;
}

.social-links a,
.cp-links a {
  display: block;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.social-links a:hover,
.cp-links a:hover {
  transform: translateX(5px);
  color: var(--hover-accent);
}

.contact-right h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.contact-right form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-right input,
.contact-right textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 1rem;
  resize: vertical;
  transition: border 0.3s ease;
}

.contact-right input:focus,
.contact-right textarea:focus {
  border-color: var(--accent-color);
  outline: none;
}

.button-link {
  padding: 0.8rem 1.5rem;
  background: var(--accent-color);
  color: #fff;
  border: none;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.button-link:hover {
  background: var(--hover-accent);
}

/*  Media Section  */
#media {
  background: var(--bg-color);
  padding: 5rem 2rem;
  overflow-x: hidden;
}

.gallery-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding: 1rem;
}

.gallery-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  width: max-content;
}

.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  width: 180px;
  height: 120px;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Media Viewer Modal  */
.media-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 1;
  transform: scale(1);
}

.media-viewer.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.media-viewer img {
  max-width: 90%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

.media-caption {
  margin-top: 0.8rem;
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 500;
}

.viewer-instruction {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #fff;
  font-style: italic;
  opacity: 0.7;
}

.close-viewer {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  font-size: 2.5rem;
  color: var(--text-color);
  cursor: pointer;
  user-select: none;
  padding: 0 10px;
  transform: translateY(-50%);
}

#prev-btn {
  left: 20px;
}
#next-btn {
  right: 20px;
}

@media (max-width: 600px) {
  .media-viewer img {
    max-height: 60vh;
  }
}

/* Footer  */
footer p {
  font-size: 0.85rem;
  color: var(--footer-text);
  text-align: center;
  padding: 1.5rem;
  white-space: nowrap; 
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

footer img.emoji {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/*  Scrollbar  */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 10px;
}

/*  Section Headings  */
.section-title {
  font-size: 2rem;
  color: var(--highlight);
  text-align: center;
  margin-bottom: 2rem;
  font-family: 'Orbitron', sans-serif;
}

/* Dark Mode Theme Overrides  */
body.light-theme {
  --bg-color: #f5f7fa;
  --text-color: #1a1a1a;
  --accent-color: #4078c0;
  --hover-accent: #305c90;
  --card-bg: #ffffff;
  --skill-bg: #e0e0e0;
  --highlight: #ff854b;
  --input-bg: #fff;
  --input-border: #ccc;
  --footer-bg: #eaeaea;
  --footer-text: #777;
  --scroll-track: #e2e6ea;
  --scroll-thumb: #b0bec5;
}

body:not(.light-theme) {
  --bg-color: #0d1117;
  --text-color: #f0f0f0;
  --accent-color: #58a6ff;
  --hover-accent: #1e90ff;
  --card-bg: #161b22;
  --skill-bg: #2c2f36;
  --highlight: #ff854b;
  --input-bg: #1c1f26;
  --input-border: #444;
  --footer-bg: #0c0f14;
  --footer-text: #aaa;
  --scroll-track: #222;
  --scroll-thumb: #444;
}

/*  Transitions & UI Enhancements  */
a, button, input, textarea {
  transition: all 0.3s ease-in-out;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Utilities  */
@media (max-width: 768px) {
  .contact-wrapper {
    flex-direction: column;
  }

  .gallery-scroll {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .project-image {
    height: 150px;
  }
}

/*  Hamburger Menu  */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
  margin-left: 1rem;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background: var(--accent-color);
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
}

#mobile-menu {
  position: fixed;
  top: 60px;
  right: 0;
  background: var(--bg-color);
  width: 220px;
  padding: 1.2rem;
  border: .1rem solid var(--highlight); 
  border-radius: 10px 0 0 10px;
  box-shadow: -2px 4px 20px rgba(0,0,0,0.2);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 1rem;
}

#mobile-menu a {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

#mobile-menu:not(.hidden){
  display: flex;
}

#mobile-menu a.click-feedback {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  transition: background 0.3s ease;
}

#mobile-menu a.active {
  color: var(--highlight);
  background-color: rgba(255, 255, 255, 0.08); 
  border-left: 3px solid var(--text-color);
  padding-left: 0.7rem;
  border-radius: 6px;
}

/*  Theme Toggle Button  */
#theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.2s ease;
}

#theme-toggle:hover {
  transform: rotate(20deg) scale(1.2);
}

/*  Scroll Hint */
.scroll-hint {
  display: none;
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 1; }
}

/*  🎀 Ribbon Trail  */
#ribbon-container {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
}

.ribbon-strip {
  position: absolute;
  width: 2px;
  height: 8px;
  background: var(--accent-color);
  opacity: 0.3;
  border-radius: 50%;
  animation: floatDown 1.6s forwards ease-in-out;
}

@keyframes floatDown {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(40px) scale(0.6);
    opacity: 0;
  }
}

/*  Accessibility/Responsive Support  */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

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

  .hero-left,
  .hero-right {
    width: 100%;
  }

  .hero-image-wrapper {
    margin-top: 2rem;
  }

  .skills-grid,
  .projects-grid,
  .cert-grid,
  .timeline-container {
    grid-template-columns: 1fr !important;
  }
}

/*  Utility Classes  */
.hidden {
  display: none !important;
}

.glass {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid var(--input-border);
  padding: 1rem;
}

.accent {
  color: var(--highlight);
  font-weight: bold;
}

.btn-glow {
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  color: white;
  background: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-color);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.btn-glow:hover {
  background: var(--hover-accent);
  box-shadow: 0 0 25px var(--hover-accent);
}

.cursor {
  animation: blink 1.2s infinite;
}

/* End Marker  */
.end-note {
  display: block;
  text-align: center;
  margin-top: 2rem;
  color: var(--footer-text);
  font-size: 0.85rem;
}

/*  Desktop Enhancements  */
@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.2rem;
  }

  .hero-description {
    font-size: 1.2rem;
  }

  .nav-menu {
    gap: 2.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-wrapper {
    flex-direction: row;
  }

  .section-title {
    font-size: 2.4rem;
  }

  .hero-image-wrapper {
    width: 300px;
    height: 300px;
  }

  .timeline-container {
    padding-left: 40px;
  }

  .timeline-container::before {
    left: 30px;
  }

  .timeline-item {
    padding-left: 4rem;
  }

  .gallery-item {
    width: 360px;
    height: 240px;
  }
}

@media (min-width: 600px) {
  .gallery-item {
    width: 240px;
    height: 160px;
  }
}

/* Ultra-Wide Screens */
@media (min-width: 1400px) {
  .hero-container {
    max-width: 1200px;
  }

  .skills-grid,
  .projects-grid,
  .cert-grid {
    gap: 3rem;
  }

  .project-image {
    height: 220px;
  }

  .project-link,
  .cert-link {
    font-size: 1.05rem;
    padding: 0.6rem 1.2rem;
  }

  .btn-glow {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2.8rem;
  }

  .hero-typewriter {
    font-size: 1.6rem;
  }

  .hero-description {
    font-size: 1.3rem;
    line-height: 1.8;
  }

  .cert-card,
  .skill-item,
  .timeline-content,
  .contact-left,
  .contact-right {
    padding: 2rem;
  }

  .timeline-content h3 {
    font-size: 1.6rem;
  }

  .edu-board,
  .edu-grade,
  .contact-left p,
  .contact-right input,
  .contact-right textarea {
    font-size: 1.05rem;
  }
}

@media (min-width: 1024px) {
  .contact-wrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
  }

  .contact-left {
    flex: 1;
    max-width: 420px;
  }

  .contact-left .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

  .contact-left p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
  }

  .social-links a,
  .cp-links a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: color 0.3s;
  }

  .social-links a:hover,
  .cp-links a:hover {
    color: var(--hover-accent);
    transform: translateX(5px);
  }

  .cp-title {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #00b894;
  }

  .contact-right {
    flex: 1;
    max-width: 500px;
  }

  .contact-right h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
  }

  .contact-right form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .contact-right input,
  .contact-right textarea {
    padding: 0.9rem 1rem;
    font-size: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    transition: border 0.3s;
  }

  .contact-right input:focus,
  .contact-right textarea:focus {
    border-color: var(--accent-color);
    outline: none;
  }

  .button-link {
    align-self: flex-start;
    padding: 0.9rem 1.6rem;
    font-size: 1rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .button-link:hover {
    background: var(--hover-accent);
  }
}

.popup {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  color: var(--text-color);
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.3);
  z-index: 2000;
  display: none;
}
.popup.show {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/*  Dino Chatbot UI */
#chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.009);
  color: var(--text-color, #fff);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 1001;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

#chatbot-toggle:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

#chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 300px;
  max-height: 420px;
  background: var(--card-bg, #1f1f1f);
  color: var(--text-color, #fff);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  font-family: 'Segoe UI', sans-serif;
}

.chatbot-header {
  background: var(--highlight, #28a745);
  color: #fff;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-avatar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
}
.chatbot-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
}
#close-chatbot {
  cursor: pointer;
  font-size: 1.2rem;
}
#back-btn {
  margin-right: 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
}
.hidden {
  display: none !important;
}

.chatbot-main {
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
  color: var(--text-color);
  background-color: var(--card-bg);
}

.chatbot-main::-webkit-scrollbar {
  width: 4px;
}
.chatbot-main::-webkit-scrollbar-thumb {
  background: var(--highlight);
  border-radius: 2px;
}

.dino-greeting {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-color);
}

#main-options {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#main-options li {
  background: rgba(100, 100, 100, 0.08); 
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  color: var(--text-color);
}

#main-options li:hover {
  background: rgba(100, 100, 100, 0.2);
}

#chatbot-sub p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-color);
}

.project-options {
  margin-top: 1rem;
}

.project-options button {
  margin: 0.4rem 0;
  background: transparent;
  border: 1px solid var(--accent-color);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.project-options button:hover {
  background: rgba(64, 120, 192, 0.5);
  color: #fff;
}

.custom-li {
  list-style: none;
  padding: 0.4rem 0;
  margin: 0;
  border-bottom: 1px solid var(--highlight);
}

#chatbot-sub a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

#chatbot-sub a:hover {
  color: var(--highlight);
}

#pre-bg {
  position: fixed;
  inset: 0;
  background: #000;
  color: #0f0;
  font-family: monospace;
  z-index: 9999;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#pre-boot-screen {
  position: absolute;
  top: 10%;
  text-align: center;
  width: 100%;
  color: #0f0;
  font-size: 1.1rem;
  line-height: 1.5;
}

#pre-hacker-lines {
  margin-top: 0.5rem;
  padding: 0 1rem;
}

#pre-hacker-lines .pre-line-fade {
  opacity: 0;
  animation: pre-fadeIn 0.4s forwards;
}

.pre-line1, .pre-line2, .pre-glitch-text {
  opacity: 0;
  transition: opacity 0.4s;
}

.show {
  opacity: 1;
}

.pre-intro-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all 0.8s ease;
}

.pre-show-dino .pre-intro-inner {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.pre-ascii-dino pre {
  font-size: 1.2rem;
  text-align: left;
  line-height: 1.3;
  color: #0f0;
  text-shadow: 0 0 2px #0f0, 0 0 10px #0f0;
}

@keyframes pre-crt-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.96; }
}
.pre-crt-flicker {
  animation: pre-crt-flicker 2s infinite;
}

.pre-glow-circle {
  border-radius: 50%;
  padding: 2rem;
  background: rgba(0, 255, 0, 0.04);
  box-shadow: 0 0 50px #0f0;
  animation: pre-pulse 2.5s infinite;
}

.pre-smoke-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pre-smoke {
  position: absolute;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #0f05, transparent);
  opacity: 0.4;
  animation: pre-rise 2s forwards;
}

@keyframes pre-rise {
  0% {
    transform: scale(0.8) translateY(0);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.3) translateY(-150px);
    opacity: 0;
  }
}

.pre-flash-overlay {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
}

.pre-flash {
  animation: pre-flashbang 0.2s ease-in-out forwards;
}

@keyframes pre-flashbang {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

#pre-skip-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  background: transparent;
  border: 1px solid #0f0;
  color: #0f0;
  font-family: monospace;
  font-size: 0.9rem;
  padding: 6px 12px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s, color 0.3s;
}
#pre-skip-btn:hover {
  background: #0f0;
  color: #000;
}

@keyframes pre-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pre-pulse {
  0%, 100% { box-shadow: 0 0 50px #0f0; }
  50% { box-shadow: 0 0 20px #0f0; }
}
