﻿/* ===== SCROLL ANIMATIONS ===== */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html, body {
  overflow-x: hidden;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #6bc9ff, #a78bfa);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

/* Hero parallax wrapper */
.hero-inner {
  will-change: transform, opacity;
}

/* Base animation states */
.scroll-animate {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Fade animations */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.fade-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.fade-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.fade-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.fade-in.animate-in {
  opacity: 1;
}

/* Scale animations */
.scale-up {
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.scale-up.animate-in {
  opacity: 1;
  transform: none;
}

/* Stagger animations for lists */
.stagger-item {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.stagger-item.animate-in {
  opacity: 1;
  transform: none;
}

/* Masked heading reveal */
.heading-mask {
  overflow: hidden;
}

.heading-mask .heading-mask-text {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.9s var(--ease-out-expo);
}

.heading-mask.animate-in .heading-mask-text {
  transform: translateY(0);
}

/* Typing animation for hero text */
.typing-animation {
  overflow: hidden;
  white-space: nowrap;
}

.typing-cursor {
  display: inline-block;
  background-color: #6bc9ff;
  width: 3px;
  animation: blink 0.8s infinite; /* Faster blinking */
}

.typing-cursor.typing {
  animation: blink 0.8s infinite; /* Faster during typing */
}

.typing-cursor.finished {
  animation: blink 0.6s infinite; /* Even faster when finished */
}

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

/* Slide animations */
.slide-up {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

.slide-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.slide-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.slide-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Rotation animations */
.rotate-in {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.rotate-in.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Performance optimizations */
.scroll-animate,
.fade-up,
.fade-left,
.fade-right,
.fade-in,
.scale-up,
.stagger-item,
.slide-up,
.slide-left,
.slide-right,
.rotate-in,
.heading-mask .heading-mask-text {
  will-change: opacity, transform;
}

/* Release the will-change hint once the reveal has fired */
.scroll-animate.animate-in,
.fade-up.animate-in,
.fade-left.animate-in,
.fade-right.animate-in,
.fade-in.animate-in,
.scale-up.animate-in,
.stagger-item.animate-in,
.slide-up.animate-in,
.slide-left.animate-in,
.slide-right.animate-in,
.rotate-in.animate-in,
.heading-mask.animate-in .heading-mask-text {
  will-change: auto;
}

/* Remove animations on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-animate,
  .fade-up,
  .fade-left,
  .fade-right,
  .fade-in,
  .scale-up,
  .stagger-item,
  .slide-up,
  .slide-left,
  .slide-right,
  .rotate-in {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .heading-mask .heading-mask-text {
    transition: none;
    transform: none;
  }

  .typing-cursor {
    display: none !important;
  }

  .hero-title {
    white-space: normal;
  }
}

/* Mobile optimizations for animations */
@media (max-width: 700px) {
  .scroll-animate,
  .fade-up,
  .fade-left,
  .fade-right,
  .slide-up,
  .slide-left,
  .slide-right {
    transition-duration: 0.6s;
  }

  .stagger-item {
    transition-duration: 0.5s;
  }

  /* Reduce motion intensity on mobile */
  .fade-up,
  .slide-up {
    transform: translateY(24px);
  }

  .fade-left,
  .slide-left {
    transform: translateX(-24px);
  }

  .fade-right,
  .slide-right {
    transform: translateX(24px);
  }

  .scale-up {
    transform: translateY(16px) scale(0.96);
  }
}

/* Performance optimizations for low-end devices */
@media (max-width: 500px) {
  .scroll-animate,
  .fade-up,
  .fade-left,
  .fade-right,
  .fade-in,
  .scale-up,
  .stagger-item,
  .slide-up,
  .slide-left,
  .slide-right,
  .rotate-in {
    transition-duration: 0.5s;
  }
  
  /* Simpler transforms for better performance */
  .fade-up.animate-in,
  .slide-up.animate-in,
  .fade-left.animate-in,
  .slide-left.animate-in,
  .fade-right.animate-in,
  .slide-right.animate-in {
    transform: translateZ(0); /* Enable hardware acceleration */
  }
}

/* ===== END SCROLL ANIMATIONS ===== */

/* Highlighted keywords in About Me */
.about-text .highlight {
  color: #6bc9ff;
  font-weight: 600;
  transition: color 0.18s;
}
/* About Me inner content spacing */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
/* About Me Socials */
.about-socials {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.3rem;
  margin-bottom: 0.1rem;
  justify-content: center;
}
.about-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6bc9ff;
  background: rgba(30, 34, 60, 0.18);
  border-radius: 0.7rem;
  padding: 0.3rem 0.5rem;
  font-size: 1.2rem;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  box-shadow: 0 0 0 #6bc9ff00;
  min-width: 44px; /* Minimum touch target size */
  min-height: 44px;
}
.about-social-icon:hover {
  background: linear-gradient(90deg, #6bc9ff 60%, #b3c6e0 100%);
  color: #181a2a;
  box-shadow: 0 2px 12px #6bc9ff55;
  transform: translateY(-2px) scale(1.07);
}
.about-language {
  font-weight: 600;
  color: #e0e6f7;
  background: rgba(107,201,255,0.08);
  border-radius: 0.6rem;
  padding: 0.18em 0.7em;
  font-size: 1.05rem;
  transition: background 0.22s, color 0.22s, box-shadow 0.22s, transform 0.18s;
  cursor: pointer;
  box-shadow: 0 0 0 #6bc9ff00;
}
.about-language:hover {
  background: linear-gradient(90deg, #6bc9ff 60%, #b3c6e0 100%);
  color: #181a2a;
  box-shadow: 0 2px 12px #6bc9ff55;
  transform: translateY(-2px) scale(1.07);
}
/* About Me Languages Row */
.about-languages {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.7rem;
  font-size: 1.08rem;
  color: #b3c6e0;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.about-languages-label {
  font-weight: 700;
  color: #6bc9ff;
  margin-right: 0.3rem;
  letter-spacing: 0.5px;
}
.about-languages-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.about-language {
  font-weight: 600;
  color: #e0e6f7;
  background: rgba(107,201,255,0.08);
  border-radius: 0.6rem;
  padding: 0.18em 0.7em;
  font-size: 1.05rem;
}
.about-languages-fluency {
  color: #6bc9ff;
  font-size: 0.98rem;
  font-weight: 500;
  margin-left: 0.3rem;
}
/* ===== Journey / Timeline Section (redesigned) ===== */
.tl-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem 4rem;
  position: relative;
  z-index: 2;
}

.tl-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2.5rem;
  text-align: center;
  text-shadow: 0 0 30px rgba(107, 201, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  letter-spacing: 0.5px;
}
.tl-section-icon {
  font-size: 1.6rem;
  display: inline-block;
  animation: tl-icon-float 3s ease-in-out infinite;
}
.tl-section-icon:last-child { animation-delay: 1.5s; }
@keyframes tl-icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(12deg); }
}

/* Panels wrapper */
.tl-panels {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  max-width: 760px;
}

/* Each accordion panel */
.tl-panel {
  border-radius: 1.4rem;
  overflow: hidden;
  background: rgba(18, 20, 44, 0.92);
  border: 1px solid rgba(var(--tl-accent-rgb, 107, 201, 255), 0.12);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.tl-panel:hover {
  border-color: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.28);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45),
              0 0 40px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.1);
}
.tl-panel[data-track="education"]    { --tl-accent: #6bc9ff; --tl-accent-rgb: 107, 201, 255; }
.tl-panel[data-track="competitions"] { --tl-accent: #ffb347; --tl-accent-rgb: 255, 179, 71; }
.tl-panel[data-track="workshops"]    { --tl-accent: #c084fc; --tl-accent-rgb: 192, 132, 252; }

/* Toggle button */
.tl-panel-toggle {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  padding: 1.25rem 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  position: relative;
}
/* Separator revealed when open */
.tl-panel-toggle::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1.6rem; right: 1.6rem;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.35),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tl-panel-toggle[aria-expanded="true"]::after { opacity: 1; }

/* Left icon square */
.tl-panel-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.1);
  border: 1px solid rgba(var(--tl-accent-rgb, 107, 201, 255), 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.18);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.tl-panel-toggle:hover .tl-panel-icon,
.tl-panel-toggle[aria-expanded="true"] .tl-panel-icon {
  box-shadow: 0 0 26px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.38);
  transform: scale(1.07);
}

/* Text info */
.tl-panel-info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  flex: 1;
  min-width: 0;
}
.tl-panel-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e8eef8;
  transition: color 0.25s ease;
}
.tl-panel-toggle[aria-expanded="true"] .tl-panel-name {
  color: var(--tl-accent, #6bc9ff);
  text-shadow: 0 0 14px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.4);
}
.tl-panel-sub {
  font-size: 0.78rem;
  color: rgba(160, 180, 210, 0.55);
  font-weight: 500;
}

/* Chevron box */
.tl-panel-chevron {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.16),
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.05)
  );
  border: 1px solid rgba(var(--tl-accent-rgb, 107, 201, 255), 0.18);
  flex-shrink: 0;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
              0 10px 24px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.08);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}
.tl-panel-toggle:hover .tl-panel-chevron {
  background: linear-gradient(
    180deg,
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.24),
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.1)
  );
  border-color: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
              0 14px 28px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.16);
}
.tl-panel-toggle[aria-expanded="true"] .tl-panel-chevron {
  transform: rotate(180deg);
  background: linear-gradient(
    180deg,
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.28),
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.12)
  );
  border-color: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
              0 16px 30px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.2);
}
.tl-panel-chevron::before,
.tl-panel-chevron::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2.5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), var(--tl-accent, #6bc9ff) 78%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.26);
}
.tl-panel-chevron::before {
  transform: translate(-92%, -38%) rotate(42deg);
  transform-origin: right center;
}
.tl-panel-chevron::after {
  transform: translate(-8%, -38%) rotate(-42deg);
  transform-origin: left center;
}
.tl-panel-toggle:focus-visible .tl-panel-chevron {
  border-color: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
              0 0 0 3px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.14),
              0 14px 28px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.18);
}

/* Collapsible body */
.tl-panel-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0 1.6rem;
  transition: max-height 0.3s ease-out,
              opacity   0.25s ease-out,
              padding   0.25s ease-out;
}
.tl-panel-body:not([hidden]) {
  max-height: 1200px;
  opacity: 1;
  padding: 1.6rem 1.6rem;
}
.tl-panel-body[hidden] {
  display: block !important;
  visibility: visible;
}

/* ---- Timeline flow ---- */
.tl-flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 4.6rem;
}
.tl-flow::before {
  content: '';
  position: absolute;
  left: 3.8rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.8),
    rgba(var(--tl-accent-rgb, 107, 201, 255), 0.18)
  );
  box-shadow: 0 0 10px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.28);
}

.tl-entry {
  position: relative;
  transition: transform 0.25s ease;
}
.tl-entry:hover {
  transform: translateX(4px);
}

.tl-entry-point {
  position: absolute;
  left: -4.6rem;
  top: 1rem;
  width: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tl-entry-year {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--tl-accent, #6bc9ff);
  letter-spacing: 0.4px;
  text-shadow: 0 0 8px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.55);
}
.tl-entry-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff 2%, var(--tl-accent, #6bc9ff) 58%);
  box-shadow: 0 0 0 4px rgba(17, 19, 43, 0.9),
              0 0 15px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.75);
  position: relative;
  flex-shrink: 0;
}
.tl-entry-dot-current {
  background: radial-gradient(circle at 30% 30%, #ffffff 2%, #00ff88 58%);
  box-shadow: 0 0 0 4px rgba(17, 19, 43, 0.9), 0 0 18px rgba(0, 255, 136, 0.9);
}
.tl-entry-dot-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 255, 136, 0.45);
  animation: tl-dot-ring 2.2s ease-out infinite;
}
@keyframes tl-dot-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.tl-entry-card {
  position: relative;
  background: linear-gradient(160deg, rgba(18, 24, 52, 0.92), rgba(18, 24, 52, 0.7));
  border: 1px solid rgba(var(--tl-accent-rgb, 107, 201, 255), 0.18);
  border-radius: 1rem;
  padding: 0.95rem 1.05rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.tl-entry-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--tl-accent, #6bc9ff), transparent);
  opacity: 0.85;
}
.tl-entry:hover .tl-entry-card {
  border-color: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.35);
  box-shadow: 0 8px 24px rgba(var(--tl-accent-rgb, 107, 201, 255), 0.11);
}

.tl-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.28rem;
  gap: 0.5rem;
}
.tl-entry-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--tl-accent, #6bc9ff);
  border: 1px solid rgba(var(--tl-accent-rgb, 107, 201, 255), 0.3);
  background: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.12);
}
.tl-badge-current {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 255, 136, 0.12);
}
.tl-entry-period {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tl-accent, #6bc9ff);
  opacity: 0.85;
  letter-spacing: 0.4px;
}

.tl-entry-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fbff;
  line-height: 1.3;
}
.tl-entry-desc {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(183, 201, 226, 0.82);
}
.tl-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.tl-entry-tags span {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--tl-accent, #6bc9ff);
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--tl-accent-rgb, 107, 201, 255), 0.25);
  background: rgba(var(--tl-accent-rgb, 107, 201, 255), 0.08);
}

.tl-entry-current .tl-entry-card {
  border-color: rgba(0, 255, 136, 0.28);
  background: linear-gradient(160deg, rgba(5, 34, 29, 0.92), rgba(5, 34, 29, 0.72));
}
.tl-entry-current .tl-entry-card::before {
  background: linear-gradient(180deg, #00ff88, transparent);
}

.tl-entry-placeholder .tl-entry-card {
  opacity: 0.65;
  border-style: dashed;
}

/* Footer */
.tl-footer {
  margin-top: 2.5rem;
  text-align: center;
}
.tl-footer-text {
  font-size: 1rem;
  color: #6bc9ff;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 0 12px rgba(107, 201, 255, 0.45);
}

@media (max-width: 700px) {
  .tl-section-title              { font-size: 1.65rem; }
  .tl-panels                     { gap: 0.7rem; }
  .tl-panel-toggle               { padding: 1.05rem 1.2rem; gap: 0.85rem; }
  .tl-panel-icon                 { width: 44px; height: 44px; font-size: 1.35rem; border-radius: 10px; }
  .tl-panel-name                 { font-size: 1rem; }
  .tl-panel-body:not([hidden])   { padding: 1rem; }
  .tl-flow                       { padding-left: 3.8rem; gap: 0.8rem; }
  .tl-flow::before               { left: 3.1rem; }
  .tl-entry-point                { left: -3.8rem; width: 3.45rem; top: 0.9rem; }
  .tl-entry-year                 { font-size: 0.68rem; }
  .tl-entry-dot                  { width: 11px; height: 11px; }
  .tl-entry-card                 { padding: 0.85rem 0.9rem; }
  .tl-entry-title                { font-size: 0.9rem; }
  .tl-entry-desc                 { font-size: 0.76rem; }
}
@media (max-width: 480px) {
  .tl-panel-toggle               { padding: 0.9rem 1rem; }
  .tl-panel-icon                 { width: 40px; height: 40px; font-size: 1.2rem; }
  .tl-panel-body:not([hidden])   { padding: 0.85rem; }
  .tl-flow                       { padding-left: 3.25rem; }
  .tl-flow::before               { left: 2.64rem; }
  .tl-entry-point                { left: -3.25rem; width: 2.95rem; }
  .tl-entry-year                 { font-size: 0.63rem; }
  .tl-entry-dot                  { width: 10px; height: 10px; }
  .tl-entry-card                 { padding: 0.78rem 0.82rem; }
  .tl-entry-title                { font-size: 0.84rem; }
}
body, h1, h2, h3, h4, h5, h6, p, span, div, section, .project-title, .project-desc, .about-title, .about-text, .skills-title, .skills-list, .skills-icons, .footer, .navbar, .nav-links, .nav-logo, .hero-title, .highlight, .navbar-container, .nav-links li {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  cursor: default;
}

input, textarea, button, a, .contact-form input, .contact-form textarea, .contact-form button {
  user-select: text;
  cursor: auto;
}
.hero-name {
  display: inline-block;
  transition: color 0.4s ease, text-shadow 0.4s ease;
  position: relative;
  padding: 10px 10px;
  margin: -10px;
}
.hero-name-anim-out {
  animation: heroNameFadeOut 0.2s forwards ease-out;
}
.hero-name-anim-in {
  animation: heroNameFadeIn 0.3s forwards ease-out;
}
@keyframes heroNameFadeOut {
  0% { 
    opacity: 1; 
    filter: blur(0px);
  }
  100% { 
    opacity: 0; 
    filter: blur(4px);
  }
}
@keyframes heroNameFadeIn {
  0% { 
    opacity: 0; 
    filter: blur(4px);
  }
  100% { 
    opacity: 1; 
    filter: blur(0px);
  }
}
.red {
  color: #ff3b3b !important;
  text-shadow: 0 0 30px rgba(255, 59, 59, 0.8), 0 0 60px rgba(255, 59, 59, 0.4);
}
body, h1, h2, h3, h4, h5, h6, p, span, div, section, .project-title, .project-desc, .about-title, .about-text, .skills-title, .skills-list, .skills-icons, .footer, .navbar, .nav-links, .nav-logo {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  cursor: default;
}

input, textarea, button, a, .contact-form input, .contact-form textarea, .contact-form button {
  user-select: text;
  cursor: auto;
}
.about-emoji {
  font-size: 3.5rem;
  margin-right: 1.5rem;
  filter: drop-shadow(0 0 12px #6bc9ffcc);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  animation: rocket-float 3.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 14px rgba(107, 201, 255, 0.5));
  cursor: pointer;
}

@keyframes rocket-float {
  0% { transform: translateY(0) rotate(-6deg); }
  100% { transform: translateY(-14px) rotate(6deg); }
}

/* Click-to-launch: blast off up-right, pause off-screen, then land back */
.about-emoji.rocket-launching {
  animation: rocket-launch 1s cubic-bezier(0.5, 0, 0.85, 0.4) forwards;
  position: relative;
  z-index: 50;
}

.about-emoji.rocket-fading-in {
  animation: rocket-fade-in 1.2s ease-out forwards;
}

@keyframes rocket-launch {
  0% { transform: translate(0, 0) rotate(-6deg); opacity: 1; }
  18% { transform: translate(-3px, 8px) rotate(-2deg) scale(0.96); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(22vw, -130vh) rotate(12deg); opacity: 0; }
}

@keyframes rocket-fade-in {
  0% { opacity: 0; transform: translateY(0) rotate(-6deg) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) rotate(-6deg) scale(1); }
}

/* Exhaust trail particles left behind during launch */
.rocket-trail {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 130, 0.95) 0%, rgba(255, 140, 50, 0.55) 55%, transparent 100%);
  pointer-events: none;
  z-index: 49;
  animation: rocket-trail-fade 2s ease-out forwards;
}

@keyframes rocket-trail-fade {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(18px) scale(0.25); }
}

@media (prefers-reduced-motion: reduce) {
  .about-emoji {
    animation: none;
    cursor: default;
  }
}


section {
  scroll-margin-top: 80px;
}

/* Mobile-friendly adjustments for all sections */
@media (max-width: 700px) {
  section {
    scroll-margin-top: 70px;
  }
}

@media (max-width: 500px) {
  section {
    scroll-margin-top: 65px;
  }
}

/* Contact Section */
.contact {
  width: 100%;
  margin: 0 auto 4rem auto;
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-title {
  font-size: 2rem;
  font-weight: 600;
  color: #e0e6f7;
  margin-bottom: 2.2rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px #6bc9ff88;
}
.contact-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 800px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 200px;
}
.contact-email a {
  color: #6bc9ff;
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 500;
  text-shadow: 0 0 8px #6bc9ff88;
  transition: color 0.2s;
}
.contact-email a:hover {
  color: #fff;
}
.contact-socials {
  display: flex;
  gap: 1.2rem;
}
.contact-icon {
  color: #6bc9ff;
  transition: color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding: 0.5rem;
  min-width: 48px; /* Better touch target */
  min-height: 48px;
}
.contact-icon:hover {
  color: #fff;
  transform: scale(1.15) translateY(-2px);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 250px;
  flex: 1 1 300px;
  background: rgba(30, 34, 60, 0.85);
  border-radius: 1.2rem;
  box-shadow: 0 4px 32px 0 #0008, 0 1.5px 0 #2224;
  padding: 2rem 1.5rem;
}
.contact-form input,
.contact-form textarea {
  background: #181a2a;
  border: 1.5px solid #2a2a4a;
  color: #e0e6f7;
  border-radius: 0.7rem;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #6bc9ff;
  box-shadow: 0 0 8px #6bc9ff55;
}
.contact-form button {
  background: linear-gradient(90deg, #6bc9ff 60%, #b3c6e0 100%);
  color: #181a2a;
  font-weight: 700;
  border: none;
  border-radius: 0.7rem;
  padding: 0.9rem 1.2rem;
  font-size: 1.1rem;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: 0 2px 12px #0006;
  transition: background 0.2s, color 0.2s;
}
.contact-form button:active {
  transform: scale(0.98);
}
@media (max-width: 700px) {
  .contact {
    padding: 0 1.5rem;
  }
  
  .contact-title {
    font-size: 1.9rem;
    margin-bottom: 2.2rem;
  }
  
  .contact-content {
    flex-direction: column;
    gap: 2.8rem;
    align-items: stretch;
    padding: 0 0.5rem;
  }
  
  .contact-info {
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  
  .contact-email a {
    font-size: 1.1rem;
    word-break: break-word;
  }
  
  .contact-socials {
    justify-content: center;
    gap: 2rem;
  }
  
  .contact-icon {
    font-size: 1.8rem;
    min-width: 52px;
    min-height: 52px;
    padding: 0.6rem;
  }
  
  .contact-form {
    min-width: 0;
    padding: 2.2rem 1.8rem;
    gap: 1.3rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 1.1rem 1.3rem;
    font-size: 1.05rem;
    border-radius: 0.8rem;
  }
  
  .contact-form textarea {
    min-height: 120px;
  }
  
  .contact-form button {
    padding: 1.2rem 1.8rem;
    font-size: 1.15rem;
    min-height: 52px;
    font-size: 1.05rem;
  }
}

@media (max-width: 500px) {
  .contact {
    padding: 0 1.2rem;
  }
  
  .contact-title {
    font-size: 1.7rem;
  }
  
  .contact-content {
    padding: 0;
  }
  
  .contact-email a {
    font-size: 1.05rem;
  }
  
  .contact-icon {
    min-width: 50px;
    min-height: 50px;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 1rem 1.2rem;
    font-size: 1rem;
  }
  
  .contact-form button {
    padding: 1.1rem 1.5rem;
    font-size: 1.1rem;
  }
}
/* Coding Languages Section */
.languages {
  width: 100%;
  margin: 0 auto 4rem auto;
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.languages-title {
  font-size: 2rem;
  font-weight: 600;
  color: #e0e6f7;
  margin-bottom: 2.2rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px #6bc9ff88;
}
.languages-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.8rem;
  margin: 0 auto 2.5rem auto;
  justify-items: center;
  max-width: 90%;
  padding: 0 2rem;
}
.language-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, #1a1d2e 0%, #16182a 100%);
  border-radius: 1.2rem;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(107, 201, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.08rem;
  color: #b3c6e0;
  min-width: 100px;
  position: relative;
  overflow: hidden;
}
.language-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(107, 201, 255, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 1.2rem;
}
.language-icon:hover::before {
  opacity: 1;
}
.language-icon svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  display: block;
}
.language-icon span {
  margin-top: 0.3rem;
  font-weight: 600;
  color: #a8c5e3;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}
.language-icon:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(107, 201, 255, 0.3), 0 0 20px rgba(107, 201, 255, 0.15);
}
.language-icon:hover svg {
  transform: scale(1.1);
}
.language-icon:hover span {
  color: #6bc9ff;
}
@media (max-width: 700px) {
  .languages {
    padding: 0 1.2rem;
  }
  
  .languages-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  
  .languages-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 720px;
  }
  .language-icon {
    min-width: 75px;
    padding: 1rem 1rem 0.7rem 1rem;
    font-size: 1rem;
  }
  
  .language-icon svg {
    width: 36px;
    height: 36px;
  }
  
  .language-icon span {
    font-size: 1rem;
  }
}

@media (max-width: 500px) {
  .languages-title {
    font-size: 1.6rem;
  }
  
  .languages-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .language-icon {
    min-width: 0;
    width: 100%;
    padding: 0.75rem 0.3rem 0.55rem 0.3rem;
    gap: 0.5rem;
  }

  .language-icon svg {
    width: 30px;
    height: 30px;
  }

  .language-icon span {
    font-size: 0.78rem;
    letter-spacing: 0.2px;
  }
}
/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

/* Mobile-only brand mark (shown ≤700px) */
.nav-brand {
  display: none;
  color: #e0e6f7;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.nav-brand-dot {
  color: #6bc9ff;
}
.nav-logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6bc9ff 0%, #a78bfa 50%, #6bc9ff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  letter-spacing: 1.5px;
  text-decoration: none;
  animation: gradientShift 3s ease infinite;
  transition: all 0.3s ease;
}

.nav-logo:hover {
  animation: gradientShift 1s ease infinite;
  transform: scale(1.05);
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  background: rgba(15, 17, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.5rem 0.6rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Desktop: float independently as a fixed centered pill */
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
}
.nav-links a {
  color: rgba(224, 230, 247, 0.7);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  cursor: default;
  position: relative;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: #fff;
}

/* Sliding Nav Indicator */
.nav-indicator {
  position: absolute;
  height: calc(100% - 0.7rem);
  background: rgba(107, 201, 255, 0.15);
  box-shadow: 0 0 20px rgba(107, 201, 255, 0.1);
  border-radius: 50px;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

/* position: relative already handled by position: fixed above (fixed also establishes a containing block) */

.nav-links a {
  position: relative;
  z-index: 1;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  transition: transform 0.3s ease;
}

.hamburger:focus {
  outline: none;
}

.hamburger-line {
  width: 2rem;
  height: 0.25rem;
  background: #e0e6f7;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
}

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

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
}

@media (max-width: 700px) {
  .navbar {
    padding: 0.7rem 0;
    background: rgba(15, 17, 30, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(107, 201, 255, 0.08);
    z-index: 201;
  }

  .navbar-container {
    padding: 0 1.2rem;
    justify-content: space-between;
  }

  .nav-brand {
    display: block;
    cursor: pointer;
  }

  .hamburger {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.3rem;
    position: relative;
    z-index: 201;
  }
  
  .hamburger-line {
    width: 100%;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    width: 100%;
    height: 100dvh;
    background: rgba(15, 17, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 200;
    border-radius: 0;
    border: none;
    padding: 2rem;
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateX(0);
    pointer-events: all;
  }
  
  .nav-indicator {
    display: none;
  }
  
  .nav-links li {
    margin: 0;
  }
  
  .nav-links a {
    font-size: 1.3rem;
    padding: 1rem 3rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    min-height: 48px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(224, 230, 247, 0.7);
    text-align: center;
  }
  
  .nav-links a:hover,
  .nav-links a:active,
  .nav-links a.active {
    color: #fff;
    background: rgba(107, 201, 255, 0.15);
    box-shadow: 0 0 20px rgba(107, 201, 255, 0.1);
  }
}

@media (max-width: 500px) {
  .navbar-container {
    padding: 0 0.8rem;
  }
  
  .nav-logo {
    font-size: 1.2rem;
  }
  
  .nav-links a {
    font-size: 1.4rem;
    padding: 1rem 2rem;
  }
}

/* About fade-in effect */
.about-container {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.4,2,.6,1), transform 0.8s cubic-bezier(.4,2,.6,1);
}
.about-container.fade-in {
  opacity: 1;
  transform: none;
}
@media (max-width: 900px) {
  .projects {
    max-width: 1000px;
  }
  
  .projects-list {
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .projects,
  .more-projects {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 700px) {
  .projects {
    padding: 2rem 1.5rem 4rem 1.5rem;
  }

  .projects-filters {
    gap: 0.55rem;
    margin-bottom: 1.6rem;
  }

  .project-filter {
    font-size: 0.86rem;
    padding: 0.55rem 0.9rem;
  }
  
  /* Compact horizontal cards on mobile: icon left, text right */
  .projects-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
  }

  .project-card,
  .projects:not(.more-projects) .project-card {
    min-width: 0;
    width: 100%;
    max-width: 480px;
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-areas:
      "icon title"
      "icon desc";
    column-gap: 1rem;
    row-gap: 0.25rem;
    align-items: center;
    text-align: left;
    padding: 1.1rem 1.2rem;
    font-size: 1rem;
    cursor: pointer !important;
    overflow: visible;
    height: auto;
  }

  /* Scoped under .project-card to outrank the base rules that appear later in this file */
  .project-card .project-image {
    grid-area: icon;
    width: 60px;
    height: 60px;
    margin-bottom: 0;
    align-self: center;
  }

  .project-card .project-icon {
    font-size: 1.9rem;
  }

  /* Hover overlay is meaningless on touch — the whole card is the tap target */
  .project-card .project-overlay {
    display: none;
  }
  
  .project-card .project-title {
    grid-area: title;
    font-size: 1.1rem;
    margin-bottom: 0;
    align-self: end;
  }

  .project-card .project-desc {
    grid-area: desc;
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 0;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    white-space: normal;
    align-self: start;
  }
  
  /* Mobile touch feedback */
  .project-card:active {
    transform: translateY(-4px) scale(1.01);
  }
  
  .project-overlay {
    cursor: pointer !important;
  }
  
  .project-view-text {
    font-size: 1.2rem;
  }
  
  .projects-title {
    font-size: 2.1rem;
    margin-bottom: 2.5rem;
  }
  
  .about-container {
    max-width: 90vw;
    padding: 2rem 1.2rem;
  }
}

@media (max-width: 500px) {
  .projects {
    padding: 2rem 1.2rem 3.5rem 1.2rem;
  }

  .projects-filters {
    justify-content: flex-start;
  }

  .project-filter {
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
  }
  
  .project-card,
  .projects:not(.more-projects) .project-card {
    padding: 1rem 1rem;
    grid-template-columns: 52px 1fr;
    column-gap: 0.85rem;
  }

  .project-card .project-image {
    width: 52px;
    height: 52px;
  }

  .project-card .project-icon {
    font-size: 1.6rem;
  }

  .project-card .project-title {
    font-size: 1.05rem;
  }

  .project-card .project-desc {
    font-size: 0.88rem;
  }

  .projects-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
}

/* Touch device optimizations for project cards */
@media (hover: none) and (pointer: coarse) {
  /* Avoid sticky hover-lift on touch devices */
  .language-icon:hover {
    transform: none;
  }

  .language-icon:hover svg {
    transform: none;
  }

  .project-card:hover {
    transform: none;
    box-shadow: 0 4px 24px 0 #0007; /* lighter shadow on touch */
    border-color: #2a2a4a;
  }
  
  .project-card:hover .project-overlay {
    opacity: 0;
  }
  
  .project-card:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 28px 0 #0009;
    border-color: #4a4a8a;
  }
  
  .project-card:active .project-overlay {
    opacity: 1;
  }
  .project-overlay {
    backdrop-filter: none; /* remove blur on mobile for performance */
  }
}
/* About Me Section */
.about {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 4rem auto;
  z-index: 2;
  position: relative;
  padding: 0 1rem;
}
.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2.5rem;
  background: transparent;
  border-radius: 1.5rem;
  box-shadow: 0 4px 32px 0 #0008;
  padding: 2.5rem 2rem;
  max-width: 800px;
  width: 100%;
}

.about-title {
  font-size: 2rem;
  font-weight: 600;
  color: #e0e6f7;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}
.about-info-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: #b3c6e0;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
  justify-content: center;
  background: rgba(30, 34, 60, 0.85);
  border-radius: 1.2rem;
  box-shadow: 0 2px 16px #0006;
  padding: 0.7rem 2rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  transition: box-shadow 0.2s;
}
.about-info-row:hover {
  box-shadow: 0 4px 32px #6bc9ff55, 0 2px 16px #000a;
}
.about-location {
  color: #6bc9ff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px #6bc9ff44;
}
.about-dot {
  color: #6bc9ff99;
  font-size: 1.2rem;
  margin: 0 0.3rem;
  font-weight: 700;
}
.about-age {
  color: #e0e6f7;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.about-role {
  color: #fff;
  background: linear-gradient(90deg, #6bc9ff 60%, #b3c6e0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 1.13rem;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px #6bc9ff33;
}
.about-icon {
  font-size: 2.1rem;
  filter: drop-shadow(0 0 8px #6bc9ff88);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.about-location {
  color: #6bc9ff;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}
.about-dot {
  color: #6bc9ff99;
  font-size: 1.2rem;
  margin: 0 0.3rem;
}
.about-age {
  color: #e0e6f7;
  font-size: 1.1rem;
  font-weight: 500;
}
.about-text {
  font-size: 1.15rem;
  color: #b3c6e0;
  line-height: 1.7;
  font-weight: 400;
}
@media (max-width: 700px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    gap: 1.8rem;
  }
  
  .about-emoji {
    font-size: 3.5rem;
    margin-right: 0;
    margin-bottom: 0.8rem;
  }
  
  .about-title {
    font-size: 1.9rem;
    text-align: center;
    margin-bottom: 1.2rem;
  }
  
  .about-info-row {
    flex-wrap: wrap;
    padding: 0.8rem 1.2rem;
    gap: 0.4rem 1.1rem;
    font-size: 1.05rem;
    justify-content: center;
    width: 100%;
  }

  /* The • separators orphan onto new lines when wrapping — drop them on mobile */
  .about-dot {
    display: none;
  }

  .about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    text-align: center;
    padding: 0 0.5rem;
  }
  
  .about-languages {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 0.5rem;
  }

  .about-languages-label {
    width: 100%;
  }

  .about-languages .about-languages-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .about-socials {
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
  }
  
  .about-social-icon {
    min-width: 50px;
    min-height: 50px;
  }
}

@media (max-width: 500px) {
  .about-container {
    padding: 2rem 1.2rem;
  }
  
  .about-emoji {
    font-size: 3rem;
  }
  
  .about-title {
    font-size: 1.7rem;
  }
  
  .about-info-row {
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    gap: 0.8rem;
  }
  
  .about-location {
    font-size: 1.05rem;
  }
  
  .about-age,
  .about-role {
    font-size: 1rem;
  }
  
  .about-text {
    font-size: 1.08rem;
    line-height: 1.7;
  }
  
  .about-language {
    font-size: 1rem;
    padding: 0.2em 0.6em;
  }
  
  .about-social-icon {
    min-width: 48px;
    min-height: 48px;
  }
}
/* Footer */
.footer {
  width: 100%;
  background: rgba(20, 22, 40, 0.95);
  color: #b3c6e0;
  padding: 2rem 0 1.2rem 0;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-top: 3rem;
  box-shadow: 0 -2px 24px #0007;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.footer-copyright {
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.footer-socials {
  display: flex;
  gap: 1.5rem;
}
.footer-icon {
  color: #6bc9ff;
  transition: color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}
.footer-icon:hover {
  color: #fff;
  transform: scale(1.15) translateY(-2px);
}

@media (max-width: 700px) {
  .footer {
    padding: 2.8rem 1.5rem 2rem 1.5rem;
    margin-top: 4rem;
  }
  
  .footer-content {
    gap: 1.8rem;
  }
  
  .footer-copyright {
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 1rem;
  }
  
  .footer-socials {
    gap: 2.5rem;
  }
  
  .footer-icon {
    min-width: 50px;
    min-height: 50px;
    padding: 0.6rem;
  }
}

@media (max-width: 500px) {
  .footer {
    padding: 2.5rem 1.2rem 1.8rem 1.2rem;
  }
  
  .footer-copyright {
    font-size: 0.95rem;
  }
  
  .footer-socials {
    gap: 2rem;
  }
  
  .footer-icon {
    min-width: 48px;
    min-height: 48px;
  }
}
/* Make main projects bigger */
.projects:not(.more-projects) .project-card {
  min-width: 300px;
  max-width: 400px;
  padding: 3rem 2rem 3.5rem 2rem;
  font-size: 1.2rem;
}
/* Projects Section */
.projects {
  margin: 4rem auto 0 auto;
  max-width: 1400px; /* Increased to fit 3 cards in one line */
  padding: 2rem 1.5rem 4rem 1.5rem;
  z-index: 2;
  position: relative;
}

.projects-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: #e0e6f7;
  letter-spacing: 1px;
  text-shadow: 0 2px 16px #000a, 0 1px 0 #222;
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.project-filter {
  border: 1.5px solid rgba(107, 201, 255, 0.25);
  background: linear-gradient(135deg, rgba(26, 30, 54, 0.95) 0%, rgba(36, 40, 72, 0.9) 100%);
  color: #d5def6;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.25s ease;
}

.project-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(107, 201, 255, 0.5);
  color: #f4f8ff;
  box-shadow: 0 6px 20px rgba(3, 10, 28, 0.35);
}

.project-filter.active {
  color: #09182e;
  border-color: rgba(107, 201, 255, 0.9);
  background: linear-gradient(135deg, rgba(107, 201, 255, 0.96) 0%, rgba(74, 158, 255, 0.95) 100%);
  box-shadow: 0 10px 28px rgba(20, 88, 139, 0.45);
}

.project-filter:focus-visible {
  outline: 2px solid rgba(107, 201, 255, 0.9);
  outline-offset: 2px;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: 2rem;
}

/* Keep the main projects in balanced desktop rows */
.projects:not(.more-projects) .projects-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}


.project-card {
  border-radius: 1.2rem;
  box-shadow: 0 4px 32px 0 #0008, 0 1.5px 0 #2224;
  color: #fff;
  min-width: 220px;
  max-width: 300px;
  flex: 1 1 220px;
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.24s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1.5px solid #2a2a4a;
  position: relative;
  cursor: pointer !important;
  overflow: hidden;
  user-select: none;
  contain: paint;
  background: linear-gradient(135deg, rgba(30, 34, 60, 0.95) 0%, rgba(40, 44, 80, 0.85) 100%);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 40px 0 #000b, 0 2px 0 #2226;
  border-color: #4a4a8a;
  cursor: pointer !important;
}

.project-card[hidden] {
  display: none !important;
}

.project-card-filter-enter {
  animation: project-filter-in 0.25s ease;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(107, 201, 255, 0.95) 0%, rgba(74, 158, 255, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.24s ease;
  border-radius: 1.2rem;
  cursor: pointer !important;
}

.project-view-text {
  color: #181a2a;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: none;
  pointer-events: none;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-image {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #23234a 60%, #6bc9ff 100%);
  border-radius: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 12px #0006;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

/* Project icon styles */
.project-icon {
  font-size: 3.5rem;
  background: linear-gradient(135deg, rgba(107, 201, 255, 0.2) 0%, rgba(74, 158, 255, 0.1) 100%);
  border: 2px solid rgba(107, 201, 255, 0.3);
  opacity: 1 !important;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.15) rotate(5deg);
  background: linear-gradient(135deg, rgba(107, 201, 255, 0.4) 0%, rgba(74, 158, 255, 0.2) 100%);
  border-color: rgba(107, 201, 255, 0.6);
}

.projects-empty {
  width: 100%;
  text-align: center;
  color: #d5def6;
  background: rgba(30, 34, 60, 0.65);
  border: 1px solid rgba(107, 201, 255, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  margin-top: 0.5rem;
}

@keyframes project-filter-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Wide project card (full-width preview) */
.project-card--wide {
  flex: 1 1 100%;
  min-width: 100%;
  max-width: 100%;
}
.project-card--wide .project-image {
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  background: none;
  box-shadow: none;
  opacity: 1;
  display: block;
}
.project-full-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  box-shadow: 0 4px 32px #0008;
}

@media (max-width: 700px) {
  .project-card--wide {
    min-width: 90vw;
    max-width: 90vw;
  }
  .project-card--wide .project-image {
    margin-bottom: 1.5rem;
  }
}

/* Desktop full-width override for wide project card */
@media (min-width: 900px) {
  .projects:not(.more-projects) .project-card.project-card--wide {
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100%;
    padding: 0; /* remove inner padding so image fills */
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .projects:not(.more-projects) .project-card.project-card--wide .project-image {
    margin: 0;
    border-radius: 1.2rem;
  }
  .projects:not(.more-projects) .project-card.project-card--wide .project-full-image {
    width: 100%;
    display: block;
    border-radius: 1.2rem;
  }
  /* Allow section itself to expand to viewport width */
  .projects.web-projects {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  /* Bleed the wide card to edges while keeping overall page padding minimal */
  .project-card--wide {
    margin-left: calc(-1 * (var(--section-side-pad, 1.5rem)));
    margin-right: calc(-1 * (var(--section-side-pad, 1.5rem)));
  }
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  color: #e0e6f7;
  letter-spacing: 0.5px;
}

.project-desc {
  font-size: 1rem;
  color: #b3c6e0;
  margin-bottom: 0.2rem;
  font-weight: 400;
  line-height: 1.4;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 40px 0 #000b, 0 2px 0 #2226;
  border-color: #4a4a8a;
}
/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%; /* Prevent font size adjustment on mobile */
  font-size: 16px; /* Base font size for better mobile readability */
}

/* Body with static night-themed gradient (animated version removed for performance) */
body {
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  text-align: center;
  min-height: 100vh;

  background: linear-gradient(135deg, #0d0d0d 0%, #1c1c3c 35%, #0a2a43 65%, #11112a 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(107, 201, 255, 0.2);
}

/* Stars background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 7s infinite ease-in-out;
}

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

/* Parallax star layers (stars generated in JS, drift with scroll) */
.star-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  will-change: transform;
}

/* Brighter accent stars on the near layer */
.star.star-bright {
  box-shadow: 0 0 6px rgba(107, 201, 255, 0.7);
}

/* Shooting star streak (spawned in JS while scrolling fast) */
.shooting-star {
  position: absolute;
  width: 110px;
  height: 2px;
  background: linear-gradient(90deg, rgba(107, 201, 255, 0), rgba(255, 255, 255, 0.9));
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  animation: shooting-star-fly 0.9s ease-out forwards;
}

@keyframes shooting-star-fly {
  0% { transform: rotate(var(--shoot-angle, 160deg)) translateX(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: rotate(var(--shoot-angle, 160deg)) translateX(280px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .star {
    animation: none;
    opacity: 0.4;
  }

  .shooting-star {
    display: none;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(107, 201, 255, 0.4);
  }
  50% {
    text-shadow: 0 0 30px rgba(107, 201, 255, 0.8), 0 0 40px rgba(107, 201, 255, 0.6);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero */
.hero {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
  min-height: 100vh; /* Full viewport height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: visible;
}


.hero-title {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: all 0.3s ease;
  will-change: transform, text-shadow; /* Optimize for animations */
  overflow: visible;
  padding: 10px 0;
}

.hero-title .highlight {
  color: #6bc9ff;
  text-shadow: 0 0 20px rgba(107, 201, 255, 0.5);
  transition: all 0.3s ease;
  overflow: visible;
}

.hero-subtitle {
  font-size: 1.8rem;
  color: #6bc9ff;
  font-weight: 400;
  opacity: 0.9;
  transition: all 0.8s ease;
  will-change: transform, opacity; /* Optimize for animations */
  margin-top: 1rem;
}

/* Responsive hero */
@media (max-width: 900px) {
  .hero {
    padding: 6rem 1rem 4rem 1rem;
    min-height: 90vh;
  }
  
  .hero-title {
    font-size: 3.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 5rem 1.5rem 3rem 1.5rem;
    min-height: 85vh;
    justify-content: center;
  }
  
  .hero-title {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
    line-height: 1.5;
  }
}

@media (max-width: 500px) {
  .hero {
    padding: 4.5rem 1.5rem 2.5rem 1.5rem;
    min-height: 80vh;
  }
  
  .hero-title {
    font-size: 2.4rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
  }
}

/* Additional mobile improvements for better UX */
@media (max-width: 700px) {
  /* Better touch targets for all interactive elements */
  a, button, .project-card, .language-icon, .about-language {
    -webkit-tap-highlight-color: rgba(107, 201, 255, 0.2);
  }
  
  /* Prevent text selection on touch devices for better UX */
  .hero-title, .hero-subtitle, .projects-title, .about-title, .contact-title, .timeline-title, .languages-title {
    -webkit-touch-callout: none;
  }
  
  /* Improve spacing between sections on mobile */
  .about, .projects, .languages, .contact {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  /* Better scrolling on iOS */
  body {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 500px) {
  /* Tighter spacing for very small screens */
  .about, .projects, .languages, .contact {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Final mobile safeguard: keep project cards stacked in a single column */
@media (max-width: 700px) {
  .projects-list,
  .projects:not(.more-projects) .projects-list {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: 1fr !important;
    align-items: center;
    justify-content: flex-start;
  }

  .project-card,
  .projects:not(.more-projects) .project-card {
    min-width: 0;
    width: 90vw;
    max-width: 90vw;
  }
}

