/* ==========================================================================
   Compatibility Fixes & Missing Styles
   Bridges class naming between HTML and core CSS
   ========================================================================== */

/* --- Navigation Fixes (HTML uses .nav-list, .nav-link, .mobile-toggle) --- */
.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  display: inline-block;
  position: relative;
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-normal);
  box-shadow: var(--glow-primary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}
.nav-link:hover {
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.4);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  z-index: calc(var(--z-nav) + 1);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition-normal);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.mobile-toggle.active .hamburger {
  background: transparent;
}
.mobile-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.mobile-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* --- Hero Section Fix (HTML uses .hero-section) --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 6rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  padding: 2rem;
}

.hero-text {
  z-index: 2;
}

.greeting {
  font-size: var(--text-lg);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  min-height: 2.5rem;
}

.typed-text {
  color: var(--primary);
}

.cursor {
  display: inline-block;
  width: 3px;
  background: var(--primary);
  animation: blink-opacity 0.8s step-end infinite;
  margin-left: 2px;
}

@keyframes blink-opacity {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

.research-interests-cycle {
  font-size: var(--text-lg);
  color: var(--text-dark);
  margin-bottom: 2rem;
}

#cycle-word {
  color: var(--text-main);
  transition: opacity 0.4s ease;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.profile-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: conic-gradient(var(--primary), var(--secondary), var(--tertiary), var(--primary));
  animation: rotate-glow 4s linear infinite;
  filter: blur(8px);
  opacity: 0.7;
}

.profile-image {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-color);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.3);
  animation: float 6s ease-in-out infinite;
}

@keyframes rotate-glow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Scroll down indicator */
.scroll-down-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-muted);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* --- Section Padding & Containers --- */
.section-padding {
  padding: 6rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-main);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: var(--glow-primary);
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-image-wrapper:hover .about-image {
  transform: scale(1.05);
}

.bio-text {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.bio-highlight {
  font-size: var(--text-lg);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.info-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  gap: 1rem;
}

.info-label {
  font-weight: 600;
  color: var(--text-main);
  min-width: 100px;
}

.info-value {
  color: var(--text-muted);
}

.info-value a {
  color: var(--primary);
  text-decoration: none;
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--text-main);
  margin-bottom: 1rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 50px;
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(var(--primary-rgb), 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

/* --- Stats Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Glass Panel (shared) --- */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: all var(--transition-normal);
}

.glass-panel:hover {
  background: var(--glass-hover);
  border-color: rgba(var(--primary-rgb), 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.1);
}

/* --- Timeline --- */
.timeline-container {
  position: relative;
}

.timeline-header {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--primary);
  margin-bottom: 2rem;
  margin-top: 3rem;
}

.timeline-header:first-child {
  margin-top: 0;
}

.mt-5 { margin-top: 3rem; }

.timeline {
  position: relative;
  padding-left: 60px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--tertiary));
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -48px;
  top: 2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-color);
  box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.5);
  z-index: 1;
}

.timeline-content {
  position: relative;
}

.timeline-date {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  font-size: var(--text-sm);
  color: var(--secondary);
  margin-bottom: 0.75rem;
  display: block;
}

.timeline-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- Publications --- */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.publication-card {
  display: flex;
  gap: 1.5rem;
  align-items: start;
}

.pub-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.pub-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.pub-meta {
  font-size: var(--text-sm);
  color: var(--text-dark);
}

/* --- Skills --- */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.skills-header {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.skill-bar-wrapper {
  margin-bottom: 1.25rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.skill-progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-tags-alt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Achievements --- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.achievement-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.achievement-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.achievement-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.achievement-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --- Gallery --- */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  grid-auto-rows: 250px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.8));
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
}

/* --- CV Section --- */
.cv-container {
  max-width: 800px;
  margin: 0 auto;
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.cv-header h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--text-main);
}

.cv-viewer {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cv-viewer object {
  border: none;
  border-radius: var(--radius-sm);
}

/* --- Certificates --- */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.certificate-card {
  overflow: hidden;
  padding: 0;
}

.certificate-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.certificate-card:hover img {
  transform: scale(1.05);
}

.cert-info {
  padding: 1.5rem;
}

.cert-info h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.cert-info p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-sm);
  color: var(--primary);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: var(--text-sm);
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.contact-item a, .contact-item p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--primary);
}

.social-links-contact {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.mt-4 { margin-top: 2rem; }

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: translateY(-3px);
}

/* --- Contact Form --- */
.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(var(--primary-rgb), 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0a0e1a;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(var(--primary-rgb), 0.1);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* --- Footer --- */
.footer {
  border-top: 2px solid;
  border-image: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary)) 1;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--text-muted);
}

.footer-links h3, .footer-social h3 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icons a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.social-icons a:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-dark);
  font-size: var(--text-xs);
}

/* ==========================================================================
   Scroll Reveal Animation System
   ========================================================================== */
.section-title,
.glass-panel,
.project-card,
.timeline-item,
.achievement-card,
.publication-card,
.stat-item,
.about-content,
.about-image-wrapper,
.skills-category,
.certificate-card,
.contact-info,
.contact-form,
.gallery-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title.revealed,
.glass-panel.revealed,
.project-card.revealed,
.timeline-item.revealed,
.achievement-card.revealed,
.publication-card.revealed,
.stat-item.revealed,
.about-content.revealed,
.about-image-wrapper.revealed,
.skills-category.revealed,
.certificate-card.revealed,
.contact-info.revealed,
.contact-form.revealed,
.gallery-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger child animations */
.stat-item:nth-child(2) { transition-delay: 0.1s; }
.stat-item:nth-child(3) { transition-delay: 0.2s; }
.stat-item:nth-child(4) { transition-delay: 0.3s; }

.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.3s; }

.achievement-card:nth-child(2) { transition-delay: 0.15s; }
.achievement-card:nth-child(3) { transition-delay: 0.3s; }

.timeline-item:nth-child(2) { transition-delay: 0.15s; }
.timeline-item:nth-child(3) { transition-delay: 0.3s; }

/* ==========================================================================
   Custom Cursor
   ========================================================================== */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s, height 0.2s, background 0.2s;
  transform: translate(-50%, -50%);
}

.cursor-outline {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}

.cursor-dot.hover {
  width: 14px;
  height: 14px;
  background: rgba(var(--primary-rgb), 0.5);
}

.cursor-outline.hover {
  width: 50px;
  height: 50px;
  border-color: var(--primary);
}

/* --- Particle Canvas --- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   Responsive Overrides
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-cta {
    justify-content: center;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .skills-container {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right var(--transition-normal);
    z-index: calc(var(--z-nav) + 10);
    padding: 2rem;
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-list {
    flex-direction: column;
    gap: 1.5rem;
  }
  .nav-link {
    font-size: var(--text-lg);
  }
  .hero-content {
    padding: 1rem;
  }
  .profile-image {
    width: 200px;
    height: 200px;
  }
  .profile-glow {
    width: 240px;
    height: 240px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .hero-name {
    font-size: var(--text-3xl);
  }
  .cursor-dot, .cursor-outline {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .masonry-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Modern Gallery Slider Component
   ========================================================================== */
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-base);
  max-width: 700px;
  margin: -2rem auto 2.5rem;
}

/* Category Tabs */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.gallery-tab {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: var(--backdrop-blur);
}

.gallery-tab:hover,
.gallery-tab.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
  transform: translateY(-2px);
}

/* Main Slider Container */
.modern-slider-container {
  position: relative;
  overflow: hidden;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  min-height: 420px;
}

.slider-track {
  position: relative;
  width: 100%;
  min-height: 350px;
}

.slide-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.slide-item.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.slide-image-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 320px;
  box-shadow: var(--shadow-glass);
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item:hover .slide-img {
  transform: scale(1.06);
}

.slide-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  color: var(--primary);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slide-details {
  display: flex;
  flex-direction: column;
}

.slide-tag {
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.slide-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.slide-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.slide-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--text-xs);
  color: var(--text-dark);
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
}

.slide-meta strong {
  color: var(--text-main);
}

/* Slider Controls (Prev/Next Buttons) */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.slider-btn:hover {
  background: var(--primary);
  color: #0a0e1a;
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 1rem; }
.next-btn { right: 1rem; }

/* Indicators / Dots */
.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.indicator-dot.active {
  width: 28px;
  border-radius: 10px;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

/* Thumbnail Strip */
.slider-thumbnails {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.thumb-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 0.8rem 0.4rem 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: var(--backdrop-blur);
}

.thumb-item img {
  width: 44px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
}

.thumb-item span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.thumb-item:hover,
.thumb-item.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  transform: translateY(-3px);
}

.thumb-item.active span {
  color: var(--primary);
}

@media (max-width: 900px) {
  .slide-item {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .slide-image-wrapper {
    height: 220px;
  }
  .modern-slider-container {
    padding: 1.5rem;
  }
  .prev-btn { left: 0.5rem; }
  .next-btn { right: 0.5rem; }
}

/* ==========================================================================
   Trionn-Inspired Compact Projects Section (Matching Screenshot)
   ========================================================================== */

.relative-container {
  position: relative;
  z-index: 2;
}

.trionn-stage-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 5;
}

.trionn-title {
  font-size: var(--text-4xl);
  margin-bottom: 0.5rem;
}

.trionn-subtitle {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Floating Thumbnails Container */
.floating-thumbs-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 450px;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

.floating-thumb {
  position: absolute;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease-out, opacity 0.4s ease, filter 0.4s ease;
  will-change: transform, opacity;
}

.floating-thumb img {
  width: 100%;
  height: 85px;
  object-fit: cover;
  display: block;
}

.thumb-label {
  display: block;
  padding: 4px 8px;
  font-size: 11px;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  background: rgba(10, 14, 26, 0.85);
  border-top: 1px solid var(--glass-border);
}

/* Position mapping for initial floating layout */
.thumb-pos-1 { top: 20px; left: 4%; width: 135px; transform: rotate(-6deg); animation: float-idle 5s ease-in-out infinite; }
.thumb-pos-2 { top: 90px; right: 5%; width: 145px; transform: rotate(5deg); animation: float-idle 6s ease-in-out 1s infinite; }
.thumb-pos-3 { top: 260px; left: 6%; width: 130px; transform: rotate(-4deg); animation: float-idle 5.5s ease-in-out 0.5s infinite; }
.thumb-pos-4 { top: 10px; right: 22%; width: 125px; transform: rotate(3deg); animation: float-idle 4.8s ease-in-out 1.5s infinite; }
.thumb-pos-5 { top: 300px; right: 10%; width: 140px; transform: rotate(-5deg); animation: float-idle 6.2s ease-in-out 2s infinite; }
.thumb-pos-6 { top: 160px; left: 16%; width: 130px; transform: rotate(4deg); animation: float-idle 5.2s ease-in-out 0.8s infinite; }

@keyframes float-idle {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

/* SVG Electric Lines Layer (Originating from Header Title) */
.electric-lines-svg-wrapper {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100% - 60px);
  pointer-events: none;
  z-index: 3;
}

.electric-svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.electric-base-path {
  stroke: rgba(0, 240, 255, 0.2);
  stroke-width: 2px;
  fill: none;
  stroke-dasharray: 6 4;
}

.electric-hit-path {
  pointer-events: stroke;
  cursor: crosshair;
}

.lightning-arc {
  stroke: #00f0ff;
  stroke-width: 3.5px;
  fill: none;
  filter: drop-shadow(0 0 10px #00f0ff) drop-shadow(0 0 20px #4361ee);
  animation: lightning-travel 2.8s infinite linear;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Show lightning when hovering near the lines */
.electric-svg:has(.electric-hit-path:hover) .lightning-arc {
  opacity: 1;
}

.endpoint-dot {
  filter: drop-shadow(0 0 8px #00f0ff);
  animation: dot-glow 1.5s ease-in-out infinite alternate;
}

@keyframes dot-glow {
  0% { r: 3.5px; opacity: 0.6; }
  100% { r: 5.5px; opacity: 1; }
}

@keyframes lightning-travel {
  0% { stroke-dashoffset: 400; }
  100% { stroke-dashoffset: -100; }
}

/* Compact Project Showcase Cards List (Matching Trionn Screenshot!) */
.trionn-compact-projects-list {
  display: flex;
  flex-direction: column;
  gap: 7rem;
  margin-top: 14rem;
  position: relative;
  z-index: 5;
}

.trionn-compact-card {
  width: 100%;
  max-width: 520px;
  position: relative;
  text-decoration: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.trionn-compact-card.align-left {
  margin-left: 0;
  margin-right: auto;
}

.trionn-compact-card.align-right {
  margin-left: auto;
  margin-right: 0;
}

.compact-media-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  height: 320px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.trionn-compact-card:hover .compact-media-wrapper {
  transform: translateY(-6px);
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 25px 55px rgba(var(--primary-rgb), 0.2);
}

.compact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.trionn-compact-card:hover .compact-img {
  transform: scale(1.06);
}

.compact-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  color: var(--primary);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.compact-card-body {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.compact-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.compact-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.compact-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.compact-explore-btn {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1.5px solid var(--text-main);
  padding-bottom: 4px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.compact-explore-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.compact-explore-btn .arrow {
  transition: transform var(--transition-fast);
  display: inline-block;
}

.compact-explore-btn:hover .arrow {
  transform: translateX(4px);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .trionn-compact-card {
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .compact-media-wrapper {
    height: 240px;
  }
  .compact-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .floating-thumbs-container {
    display: none;
  }
  .electric-lines-svg-wrapper {
    display: none;
  }
}



/* --- Skills Orbit Experience --- */
.skills-section {
  position: relative;
  overflow: visible !important;
}

.skills-sticky-wrapper {
  position: sticky;
  top: 15vh;
  height: 70vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none; /* Let clicks pass through to skills content */
}

.orbit-title-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.orbit-title-container .section-title {
  margin-bottom: 0;
  font-size: 4.5rem;
  background: linear-gradient(135deg, #fff, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

.orbit-title-container .orbit-subtitle {
  font-size: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.orbit-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(75deg);
  width: 650px;
  height: 650px;
  transition: opacity 0.5s ease;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.15);
}

.orbit-ring.ring-1 {
  width: 100%;
  height: 100%;
  border-width: 1px;
}

.orbit-ring.ring-2 {
  width: 135%;
  height: 135%;
  border-style: dashed;
  border-color: rgba(67, 97, 238, 0.3);
  animation: spin-slow 60s linear infinite reverse;
}

.orbit-icons-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

.orbit-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.05);
  backdrop-filter: blur(10px);
  will-change: transform;
  z-index: 10;
}

.orbit-icon svg {
  width: 32px;
  height: 32px;
  stroke: #00f0ff;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.5));
}

@keyframes spin-slow {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.skills-content-stage {
  position: relative;
  z-index: 5;
  margin-top: -60vh;
  padding-top: 80vh;
}

/* ==========================================================================
   F1 Style Navigation Bar & Sidebar Drawer
   ========================================================================== */

/* The diagonal stripes background inspired by F1 */
.f1-stripes-bg {
  background-color: #15151e !important; /* Base dark color */
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 15px,
    rgba(255, 255, 255, 0.03) 15px,
    rgba(255, 255, 255, 0.03) 30px
  ) !important;
  border-bottom: 2px solid var(--primary); /* Theme accent */
}

/* Ensure navbar retains flex layout with our new structure */
.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.desktop-nav-menu {
  display: flex;
}
@media (max-width: 991px) {
  .desktop-nav-menu {
    display: none; /* Hide horizontal links on mobile */
  }
}

/* Force hamburger to show even on desktop so they can open the right menu */
.f1-hamburger {
  display: flex !important;
}

/* Sidebar Drawer container */
.f1-sidebar-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  max-width: 100vw;
  height: 100vh;
  z-index: 9999;
  background-color: rgba(21, 21, 30, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 2px solid var(--primary);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.f1-sidebar-drawer.active {
  right: 0;
}

.f1-sidebar-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.close-sidebar {
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close-sidebar:hover {
  color: var(--primary);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-link {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-left: 0;
  transition: padding-left 0.3s ease, color 0.3s ease;
}

.sidebar-link:hover {
  color: var(--primary);
  padding-left: 10px;
}
.sidebar-link::before {
  content: '>';
  position: absolute;
  left: 0;
  opacity: 0;
  color: var(--primary);
  transition: opacity 0.3s ease, left 0.3s ease;
}
.sidebar-link:hover::before {
  opacity: 1;
  left: -15px;
}

/* Sidebar Overlay */
.f1-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.f1-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Circular Brand Logo in Navbar */
.brand-logo {
  height: 50px; /* Set height appropriately for navbar */
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
  object-position: left; /* Crops to the circular part on the left */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-container {
  padding: 0 0.5rem;
  max-width: 1000px;
  margin: 0 auto;
  gap: 2rem;
}

.brand-logo-link:hover .brand-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.6));
}

/* ==========================================================================
   Glassmorphism Navigation
   ========================================================================== */
.glassmorphism-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 95vw;
  padding: 0.5rem 1.5rem;
  background: rgba(15, 15, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  z-index: var(--z-nav);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.glassmorphism-nav.scrolled {
  top: 1rem;
  padding: 0.4rem 1.25rem;
  background: rgba(10, 10, 10, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.glassmorphism-nav.nav-hidden {
  transform: translate(-50%, -150%);
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Particle Signature Canvas
   ========================================================================== */
.signature-section {
  position: relative;
  width: 100%;
  height: 350px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin-top: var(--space-xl);
}

.footer-signature {
  margin-top: 1.5rem;
  height: 150px;
  width: 100%;
  max-width: 250px;
}

#signature-canvas {
  cursor: crosshair;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* ==========================================================================
   New Skills Rearrangement & Flowchart
   ========================================================================== */

/* The icons start in orbit, but when rearranged they go absolute and we manually position them via GSAP or CSS */
.orbit-icon.rearranged {
  animation: none !important;
  transform: none !important;
  position: absolute;
  transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Radar Chart Grid styles */
.radar-chart-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 400px;
  height: 400px;
  opacity: 0;
  transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  z-index: 0;
}

.radar-chart-grid.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.radar-fill {
  transform-origin: center;
  animation: radarPulse 4s infinite alternate;
}

@keyframes radarPulse {
  0% { opacity: 0.5; filter: drop-shadow(0 0 5px rgba(0,240,255,0.2)); }
  100% { opacity: 0.8; filter: drop-shadow(0 0 15px rgba(0,240,255,0.6)); }
}

/* Radar Label positioning */
.radar-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

/* Position text left or right depending on the icon's side */
.orbit-icon[data-side="left"] .radar-label {
  right: calc(100% + 20px);
  text-align: right;
}

.orbit-icon[data-side="right"] .radar-label {
  left: calc(100% + 20px);
  text-align: left;
}

/* The top and bottom icons need custom placement */
.orbit-icon[data-index="4"] .radar-label {
  top: 50%;
  right: calc(100% + 20px);
  transform: translateY(-50%);
  bottom: auto;
  left: auto;
}

.orbit-icon[data-index="5"] .radar-label {
  top: calc(100% + 15px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  right: auto;
}

.radar-label h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}

.radar-label p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.3;
  margin: 0;
}

/* Make labels appear when active */
.orbit-icon.radar-active .radar-label {
  opacity: 1;
}

@keyframes svgGlitch {
  0% { transform: translate(0); filter: drop-shadow(-2px 0 red) drop-shadow(2px 0 cyan); }
  25% { transform: translate(-2px, 2px); filter: drop-shadow(2px 0 red) drop-shadow(-2px 0 cyan); }
  50% { transform: translate(2px, -2px); filter: drop-shadow(-2px 0 red) drop-shadow(2px 0 cyan); }
  75% { transform: translate(-1px, -1px); filter: none; }
  100% { transform: translate(0); filter: drop-shadow(0 0 5px var(--primary)); }
}

.physics-labels-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
}

.physics-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.physics-node .physics-label-text h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}

.physics-node .radar-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  opacity: 1 !important;
}

/* Position labels closely near the 0x0 point of the physics node */
.physics-node[data-index="0"] .radar-label { right: 15px; }
.physics-node[data-index="1"] .radar-label { left: 15px; }
.physics-node[data-index="2"] .radar-label { right: 15px; }
.physics-node[data-index="3"] .radar-label { left: 15px; }
.physics-node[data-index="4"] .radar-label { top: auto; bottom: 15px; left: 50%; transform: translateX(-50%); right: auto; }

/* ==========================================================================
   Navigation Hide on Scroll
   ========================================================================== */
.navbar {
  transition: transform 0.3s ease-in-out, background 0.3s ease, border 0.3s ease, padding 0.3s ease;
}

.navbar.nav-hidden {
  transform: translateY(-100%);
}

/* ==========================================================================
   Modern Certificate Cards Layout
   ========================================================================== */
.modern-cert-card {
  background-color: #121621;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.modern-cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.cert-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #f5f5f5;
}

.cert-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.modern-cert-card:hover .cert-image-wrapper img {
  transform: scale(1.05);
}

.cert-persistent-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.modern-cert-card:hover .cert-persistent-icon {
  opacity: 0;
}

.cert-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(18, 22, 33, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.modern-cert-card:hover .cert-hover-overlay {
  opacity: 1;
}

.cert-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cert-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modern-cert-card .cert-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.modern-cert-card .cert-info h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.modern-cert-card .cert-date {
  color: #4dabf7;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.modern-cert-card .cert-info p {
  color: #8c92a0;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Media Masonry Grid (Photo Gallery)
   ========================================================================== */
.media-masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 1rem;
  margin-top: 2rem;
}

.media-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--glass-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  z-index: 2;
}

.media-item:hover img,
.media-item:hover video {
  transform: scale(1.05);
}

/* Span Classes for Bento Box Effect */
@media (min-width: 600px) {
  .media-item.span-row-2 {
    grid-row: span 2;
  }
  .media-item.span-col-2 {
    grid-column: span 2;
  }
  .media-item.span-col-2.span-row-2 {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 599px) {
  .media-masonry-grid {
    grid-auto-rows: 200px;
  }
  /* On very small screens, maybe don't span columns so they fit */
  .media-item.span-col-2 {
    grid-column: span 1;
  }
  .media-item.span-row-2 {
    grid-row: span 2;
  }
}


/* ==========================================================================
   3D Coverflow Gallery
   ========================================================================== */
.coverflow-gallery-container {
  padding: 3rem 2rem;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: center;
  margin-top: 3rem;
  overflow: hidden;
}

.coverflow-header .coverflow-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.coverflow-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-main);
  margin: 0.5rem 0;
}

.coverflow-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Filter Pills */
.coverflow-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.cf-pill {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cf-pill.active, .cf-pill:hover {
  background: var(--primary-color, #4dabf7);
  color: #fff;
  border-color: var(--primary-color, #4dabf7);
}

.cf-pill.view-more {
  background: transparent;
  border-color: var(--text-main);
  color: var(--text-main);
}

.cf-pill.view-more i {
  margin-left: 0.5rem;
}

/* 3D Track */
.coverflow-track-wrapper {
  position: relative;
  height: 450px;
  width: 100%;
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  overflow: hidden;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.coverflow-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s, filter 0.6s;
  margin-left: -160px;
  margin-top: -210px;
  cursor: pointer;
  background: #000;
}

.coverflow-item img, .coverflow-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Controls */
.coverflow-controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.cf-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-main);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cf-btn:hover {
  background: var(--text-main);
  color: var(--bg-main, #0f1219);
}

/* Hide old masonry */
.media-masonry-grid { display: none; }



.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}
.about-stats .stat-item {
    margin: 0;
    padding: 2rem;
}

/* Justify bio text */
.bio-text, .bio-highlight {
    text-align: justify;
}


/* ==========================================================================
   Mobile Responsiveness Overrides
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. About Section */
    .about-grid {
        grid-template-columns: 1fr !important;
    }
    .about-stats {
        margin-top: 2rem;
    }

    /* 2. Coverflow Slider */
    .coverflow-item {
        width: 260px;
        height: 340px;
        margin-left: -130px;
    }

    /* 3. Hero Typography */
    .typewriter {
        font-size: var(--text-xl);
    }
    .hero-subtitle {
        font-size: var(--text-base);
    }
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    /* 4. Timeline (Journey) */
    .timeline {
        padding-left: 1.5rem;
    }
    .timeline-dot {
        left: -1.5rem;
    }

    /* 5. Skills Orbit Section */
    .orbit-rings {
        transform: scale(0.6);
    }
    .radar-chart-grid.active {
        transform: translate(-50%, -50%) scale(0.65) !important;
    }
    .orbit-icons-container {
        transform: translate(-50%, -50%) scale(0.7);
    }

    /* Fix radar labels on mobile to avoid horizontal scroll */
    .radar-label {
        font-size: 0.75rem;
    }
    .radar-label h4 {
        font-size: 0.9rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}


/* ==========================================================================
   Footer Newsletter Section
   ========================================================================== */
.footer-newsletter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.newsletter-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.newsletter-form-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-form .btn-join {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    font-family: inherit;
}

.newsletter-form .btn-join:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.newsletter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.newsletter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Footer Bottom Updates */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal-links a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .footer-newsletter {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* ==========================================================================
   AI Summary Links
   ========================================================================== */
.ai-summary-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.ai-summary-text {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-heading);
}

.ai-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.ai-icon:hover {
    color: #ffffff;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

@media (max-width: 768px) {
    .ai-summary-container {
        justify-content: center;
        margin-top: 1rem;
    }
}
