:root {
  --bg1: #0f2027;
  --bg2: #203a43;
  --bg3: #2c5364;
  --text: #f5f5f5;
  --revert: black;
  --accent: #00f2fe;
  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.2);
  --card-bg: rgba(255, 255, 255, 0.1);
}

body.light {
  --bg1: #dbe6f6;
  --bg2: #cfd9df;
  --bg3: #e2ebf0;
  --text: #222;
  --revert: white;
  --accent: #3f51b5;
  --glass-bg: rgba(255,255,255,0.5);
  --glass-border: rgba(0,0,0,0.1);
  --card-bg: rgba(255, 255, 255, 0.8);
}

#dna-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

body.light #dna-canvas { opacity: 0.8; }
body:not(.light) #dna-canvas { opacity: 0.95; }


/* --- CV iframe --- */
iframe {
  width: 100%;
  height: 100%;
  min-height: 3200px;
  overflow: hidden;
}

/* --- Base --- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui;
  color: var(--text);
  background: linear-gradient(-45deg, var(--bg1), var(--bg2), var(--bg3));
  background-size: 200% 200%;
  animation: gradientMove 25s ease infinite;
  transition: background 0.8s ease, color 0.3s ease;
  /* background-image: url("assets/bg.gif"); 
  background-size: stretch;
  background-position: center;
  background-repeat: no-repeat;  */
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Navbar (Floating Transition on Scroll) --- */
.nav-glass {
  position: relative;
  top: 0;
  /* left: 50%;
  transform: translateX(-50%); */
  width: calc(100% - 1rem);
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  background: rgba(20, 10, 5, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: none;
  transition: fadeIn 0.35s ease;
  margin: 0.5rem auto;
  z-index: 10000;
}
.nav-glass {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Give equal space but allow icons/buttons to stay minimal */
.nav-glass > .nav-min-width {
  min-width: 62px;
}
#menu-toggle {
  flex: 0 0 auto; /* Prevents hamburger from stretching */
}

.theme-switch {
  flex: 0 0 auto; /* Prevents theme toggle from stretching */
}
/* 
.nav-glass > ul {
  display: flex;
  justify-content: center; 
} */

body.light .nav-glass {
  background: rgba(255,255,255,0.8);
}

/* When scrolling — becomes floating */
.nav-glass.floating {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  background: rgba(20, 10, 5, 0.85);
  animation: fadeSlideDown 0.4s ease;
}
body.light .nav-glass.floating {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
@keyframes fadeSlideDown {
  from { transform: translate(-50%, -10px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}
nav ul li a:hover { color: var(--accent); }
nav ul li a.active { color: var(--accent); font-weight: 700; }

/* === THEME TOGGLE - Neon Glow Switch === */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 62px;
  height: 30px;
  cursor: pointer;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 242, 254, 0.15);
  border-radius: 30px;
  transition: 0.4s;
  box-shadow:
    inset 0 0 8px rgba(0,242,254,0.25),
    0 0 8px rgba(0,242,254,0.25);
  display: flex;
  align-items: center;
}

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.4s;
  box-shadow: 0 0 6px rgba(255,255,255,0.8);
}

/* Icon inside slider */
.slider .icon {
  position: absolute;
  right: 7px;
  font-size: 15px;
  color: var(--accent);
  transition: 0.3s;
}

/* ===== LIGHT MODE ON ===== */
input:checked + .slider {
  background: var(--accent);
  /* box-shadow:
    0 0 12px var(--accent),
    0 0 24px var(--accent); */
}

input:checked + .slider::before {
  transform: translateX(30px);
  background: white;
}

input:checked + .slider .icon {
  left: 8px;
  color: yellow;
}

#theme-toggle {
  border: 1px solid var(--accent);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 1px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
#theme-toggle:hover { transform: scale(1.05); }

#menu-toggle {
  display: none;
  height: 30px;
  width: 30px;
  font-size: 20px !important;
  text-align: center;
  color: white;
  cursor: pointer;
  clip-path: polygon(50% 0%, 96% 25%, 96% 78%, 50% 100%, 4% 78%, 4% 25%);
  background: radial-gradient(circle at center, var(--accent) 0%, #086d72 100%);
  z-index: 1;
    transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    background 0.4s ease,
    filter 0.4s ease;
    /* animation: twinkleCenter 4s infinite ease-in-out; */
  /* animation: glowRotate 10s linear infinite; */
}
#menu-toggle {
  transition: all 0.3s ease;
}
#menu-toggle.open {
  background: var(--text); /* changes when menu opens */
  color: red !important;
  font-size: 20px !important;
  transform: rotate(180deg);
  box-shadow: 0 0 12px var(--accent);
  animation-play-state: paused; /* ⛔ Stop twinkle */
  filter: none; /* Optional: remove glow for clean look */
}

.tagline {
  height: 25px;
  margin: 0 0 4px 0;
}
/* --- Mobile Nav --- */
@media (max-width: 768px) {
  .nav-glass {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0.8rem 1rem;
  }
  nav ul {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: fit-content;
    background: rgba(20, 10, 5, 0.95);
    border-radius: 1rem;
    padding: 1rem;
    gap: 1rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.35s ease;
  }
  body.light nav ul { background: rgba(255,255,255,0.95); }
  nav ul.show { max-height: 400px; opacity: 1; max-width: 230px;}
  #menu-toggle { display: block; }
  #menu-toggle.open {
    color: red !important;
  }
  nav ul li a { font-size: 1.05rem; }
}

/* --- Page offset to clear nav height --- */
main, .page { padding-top: 90px; }

/* --- Sections --- */
.page {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .45s ease, transform .45s ease;
  min-height: 70vh;
  padding: 2rem 1.25rem;
}
.page.active { display: block; opacity: 1; transform: translateY(0); }
.hero { text-align: center;}
.highlight { color: var(--accent); }

/* --- Cards --- */
.card.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  margin: auto 0;
  width: 100%;
  max-width: 600px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  margin-top: .65rem;
  padding: .5rem .9rem;
  border-radius: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease;
}
.btn:hover { transform: scale(1.05); }

/* --- Skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  max-width: 1200px;
}
.skill-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-align: center;
  padding: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
  backdrop-filter: blur(8px);
}
.skill-card img { width: 56px; height: 56px; margin-bottom: 8px; object-fit: contain; }
.skill-card span { color: var(--text); font-weight: 600; display:block; }
.skill-card:hover { transform: translateY(-6px); box-shadow: 0 6px 18px rgba(0,0,0,0.28); }

/* --- Modal --- */
.modal {
  position: fixed;
  top: -88px;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}
.modal-box {
  width: 100%;
  height: 100%;
  padding-bottom: 10%;
  /* padding-bottom: 25%; */
  overflow: auto;
  display: flex;
  align-items: start;
  justify-content: center;
}
.modal-content {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin: 10px;
  padding: 1.5rem;
  text-align: center !important;
  /* max-width: 640px; */
  width: 100%;
  color: var(--text);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  text-align: left;
  animation: slideUp 0.3s ease;
  /* max-height: 85vh; */
  overflow-y: hidden;
  display: flex;
  justify-content: start;
  align-items: center;
  top: 73px;
}
.modal.show {
  overflow-y: auto;
}
.modal-content img {
  width: auto;
  height: 70vh;
  /* max-height: 500px; */
  border-radius: 10px;
}
.modal-info {
  text-align: left;
  padding: 20px;
}
.close {
  position: absolute;
  top: 12px;
  background: var(--text);
  height: 30px !important;
  width: 30px !important;
  padding: 0 !important;
  right: 16px;
  font-size: 1.6rem;
  cursor: pointer;
  color: red;
  transition: transform 0.2s ease;
}
.contact-btn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: linear-gradient(90deg, var(--accent), #38f3ff88);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight:700;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}
.contact-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.2); }

.close:hover { transform: scale(1.15); color: red; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- Prevent scroll when modal open --- */
html.modal-open, body.modal-open { overflow: hidden !important; height: 100%; }

/* --- Loader --- */
#loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity .4s ease, visibility .4s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.page.active .limit-width {
    display: flex;
    align-items: start;
    justify-content: center;
}
.page.active h2 {
    max-width: 1200px;
    width: 100%;
}
/* .page.active {
    display: flex;
    align-items: start;
    justify-content: center;
} */
/* --- Projects (case studies) --- */
#projects h2 {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  /* margin:0; */
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
/* === Project Cards (CodePen Reveal Style) === */
.project-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

/* Shine reflection effect */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
}
.project-card:hover::before {
  left: 125%;
}

/* Project Image */
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.project-card:hover img {
  transform: scale(1.1);
  filter: brightness(0.6);
}

/* Overlay Gradient */
.project-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.15));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover .overlay {
  opacity: 1;
}

/* Text Reveal */
.project-card .info {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  padding: 1.2rem;
  transition: bottom 0.4s ease;
}
.project-card:hover .info {
  bottom: 0;
}
.project-card h3 {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
  font-weight: 700;
}
.project-card p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}
body.light .project-card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
}
body.light .project-card p { color: var(--revert); }

footer {
  text-align: center;
  padding: 1rem;
  color: var(--accent);
}
/* === FINAL PERFECT DOT ALIGNMENT === */

/* Center vertical line */
.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), rgb(0 90 255 / 25%));
  border-radius: 3px;
  overflow: hidden;
  z-index: 0;
}

/* Moving light pulse */
.timeline-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, rgba(0,242,254,0.6), rgba(140,82,255,0.7));
  filter: blur(4px);
  animation: timelinePulse 5s linear infinite;
}
@keyframes timelinePulse {
  0% { top: -20%; opacity: 0.6; }
  50% { top: 60%; opacity: 1; }
  100% { top: 120%; opacity: 0; }
}

/* Timeline blocks (cards) */
.timeline-block {
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: 50%;
  padding: 2rem 2rem;
  box-sizing: border-box;
  z-index: 1;
}

.timeline-block.left {
  justify-content: flex-end;
  text-align: right;
  padding-right: 60px;
}

.timeline-block.right {
  justify-content: flex-start;
  text-align: left;
  left: 50%;
  padding-left: 60px;
}

.timeline-block.right .timeline-dot {
    left: 0;    top: 50%;
}
.timeline-block.left .timeline-dot {
    left: 100%;    top: 50%;
}

/* Dot now aligns globally (container-based) */
.timeline-dot {
  position: absolute;
  top: 2rem;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent) 0%, #086d72 100%);
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow:
    0 0 8px rgba(0,242,254,0.7),
    0 0 18px rgba(140,82,255,0.5),
    inset 0 0 4px rgba(255,255,255,0.2);
  z-index: 3;
  animation: pulseDot 3s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.25); }
}

/* Content cards */
#roadmap-timeline * {
  transition: all 1s ease;
}
.timeline-content {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 1.5rem 1.2rem;
  max-width: 340px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  transition: max-height 1s ease;
}
.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.timeline-content:hover .timeline-title, .timeline-content:hover .timeline-desc {
  -webkit-line-clamp: unset; /* remove the limit */
  overflow: visible;
  max-height: unset;
}
.timeline-content:hover {
  max-height: unset;
}

/* Typography */
.timeline-year {
  display: block;
  background: linear-gradient(90deg, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: .3rem;
}
.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #fff);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1; /* limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 24px;
  transition: max-height 1s ease;
}
.timeline-desc {
  margin-top: .4rem;
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 50px;
  transition: max-height 1s ease;
}
body.light .timeline-content p {
  color: black;
}
body.dark .timeline-content p {
  color: rgba(255,255,255,0.88);
}

/* Fade & reveal */
.fade-up { opacity: 0; transform: translateY(25px); transition: all .6s ease; }
.revealed { opacity: 1; transform: translateY(0); }

/* Mobile fix: align dots with left line */
@media (max-width: 768px) {
    
  .section-title {
    text-align: center;
  }

  .timeline-line { left: 28px; transform: none; }
  .timeline-block {
    width: 100%;
    left: 0;
    text-align: left;
    justify-content: flex-start;
  }
  .timeline-dot {
    left: 9px;
    top: 106px;
  }
  .timeline-content {
    max-width: 100%;
    min-height: 160px;
    max-height: 160px;
  }
  .timeline-block.left .timeline-dot {
    left: 9px;
  }
  .timeline-block.right {
    left: 9px;
    padding: 10px 10px 10px 21px
  }
  .timeline-block.left {
    padding: 10px 0 10px 30px;
    text-align: left;
  }
  .skills-grid {
    grid-template-columns: none;
  }
}

.loader-text {
  z-index: 99;
  color: black;
  font-weight: bold;
}
.loader-circle {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  padding: 20px;
  /* width: 32px;
  height: 32px; */
  border-radius: 50%;
  background: radial-gradient(circle at center, #00f2fe 0%, var(--accent) 100%);
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow:
    0 0 8px rgba(0,242,254,0.7),
    0 0 18px rgba(140,82,255,0.5),
    inset 0 0 4px rgba(255,255,255,0.2);
  z-index: 3;
  animation: pulseDot 3s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.25); }
}

/* Profile avatar */
/* --- Polygon + Floating Head Avatar (Refined Depth Layout) --- */
.avatar-container {
  position: relative;
  display: inline-block;
  width: 260px;
  height: 280px;
  margin: 0 auto;
  filter: drop-shadow(0 0 25px rgba(0, 242, 254, 0.25));
  perspective: 800px;
}

/* Polygon frame background */
.avatar-polygon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0%, 96% 25%, 96% 78%, 50% 100%, 4% 78%, 4% 25%);
  background: linear-gradient(135deg, #00f2fe, #00c6ff, #0078ff);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 20px rgba(0, 242, 254, 0.5),
    0 0 40px rgba(0, 97, 255, 0.3),
    inset 0 0 10px rgba(255, 255, 255, 0.05);
  animation: glowRotate 10s linear infinite;
  z-index: 1;
    transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    background 0.4s ease,
    filter 0.4s ease;
}

@keyframes glowRotate {
  100% { transform: rotate(360deg); }
}

/* The transparent image that breaks above the polygon */
.avatar-image {
  position: absolute;
  bottom: -5%; /* ensures shoulders go inside polygon */
  left: 50%;
  transform: translateX(-50%);
  width: 113%;
  height: auto;
  border-radius: 0;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s ease, filter 0.3s ease;
}

/* Optional hover lift */
/* .avatar-container:hover .avatar-image {
  transform: translateX(-50%) scale(1.05);
  filter: drop-shadow(0 12px 35px rgba(0, 242, 254, 0.4));
} */
.avatar-container:hover .avatar-image {
  transform: translateX(-50%) scale(1.05);
  filter:
    drop-shadow(0 12px 35px rgba(0, 0, 0, 0.75))
    brightness(0.95);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.avatar-container:hover .avatar-polygon {
  /* transform: scale(1.3); */
  background: rgba(20, 10, 5, 0.9); 
  filter: brightness(0.9);
  box-shadow:
    0 0 25px rgba(0, 0, 0, 0.7),
    inset 0 0 12px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.4s ease,
    filter 0.4s ease,
    box-shadow 0.4s ease,
    background 1s ease;
}
/* .avatar-container {
  position: relative;
}
.hero .limit-width {
  min-height: 62px;
}
.avatar-image {
  z-index: 99;
  position: relative;
} */
.avatar-circle {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: 50%;
  height: 135px;
  width: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #00f2fe 0%, var(--accent) 100%);
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.7), 0 0 18px rgba(140, 82, 255, 0.5), inset 0 0 4px rgba(255, 255, 255, 0.2);
  z-index: 3;
  animation: pulseDot 3s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}
.avatar-icon {
  position: relative;
}
/* === Avatar Icon Twinkling Effect === */
.avatar-icon span {
  position: absolute;
  pointer-events: all;
  bottom: 10px;
  /* transform: translateX(91px); Look for "twinkle" aniumation it is there*/
  color: var(--accent);
  font-size: 22px;
  font-weight: 300;
  text-shadow: 0 0 6px rgba(0, 242, 254, 0.6);
  animation: twinkle 2.4s infinite ease-in-out;
}

/* Soft glowing twinkle animation */
@keyframes twinkle {
  0%, 100% {
    opacity: 0.8;
    text-shadow:
      0 0 4px rgba(0, 242, 254, 0.4),
      0 0 10px rgba(0, 242, 254, 0.3);
    transform: translateX(91px) scale(1);
  }
  50% {
    opacity: 1;
    text-shadow:
      0 0 8px rgba(0, 242, 254, 0.8),
      0 0 20px rgba(0, 242, 254, 0.7),
      0 0 30px rgba(0, 242, 254, 0.5);
    transform: translateX(91px) scale(1.1);
  }
}
@keyframes twinkleCenter {
  0%, 100% {
    opacity: 0.8;
    text-shadow:
      0 0 4px rgba(0, 242, 254, 0.4),
      0 0 10px rgba(0, 242, 254, 0.3);
    transform: translateX(0) scale(1);
  }
  50% {
    opacity: 1;
    text-shadow:
      0 0 8px rgba(0, 242, 254, 0.8),
      0 0 20px rgba(0, 242, 254, 0.7),
      0 0 30px rgba(0, 242, 254, 0.5);
    transform: translateX(0) scale(1.1);
  }
}

  /* === View Toggle Buttons === */
.view-toggle {
  display: flex;
  gap: 0.5rem;
}
.toggle-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--accent);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.toggle-btn:hover {
  transform: scale(1.05);
}
.toggle-btn.active {
  background: linear-gradient(90deg, var(--accent), #38f3ff88);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* === Carousel View (3D Rotating Style) === */
.projects-grid.carousel-view {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  height: 460px;
  position: relative;
  overflow: visible;
}

.carousel-container {
  position: relative;
  width: 340px;
  height: 420px;
  transform-style: preserve-3d;
  animation: rotateCarousel 30s infinite linear;
}

@keyframes rotateCarousel {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.carousel-view .project-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 400px;
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 0.6s ease, box-shadow 0.3s ease;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.carousel-view .project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.carousel-view .project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hide overflow for carousel parent */
.carousel-view-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}


/* === Skill Categories (Refined Glass Aesthetic) === */
.skills-category {
  margin-bottom: 2.8rem;
  text-align: center;
}

.skills-category-title {
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgb(0 0 0 / 30%);
  background: linear-gradient(90deg, var(--accent), var(--accent), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}

.skills-category-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin: 0.6rem auto 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0.6;
}

.skills-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

/* === Swiper Coverflow Carousel (5-card Responsive Smart Scale) === */
.carousel-wrapper {
  width: 100%;
  min-height: 480px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: visible !important;
}

.swiper {
  width: 100%;
  max-width: 1400px;
  height: 420px;
  padding: 50px 0 90px;
  overflow: visible !important;
}

.swiper-slide {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-box-reflect: below -6px
    linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.4));
  transform-origin: center;
  transition: transform 0.4s ease, z-index 0.3s ease;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

.swiper-slide .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.swiper-slide:hover .overlay {
  opacity: 1;
}

.swiper-slide .overlay ion-icon {
  font-size: 3rem;
  color: var(--accent);
  opacity: 0;
  transition: all 0.3s ease;
}

.swiper-slide:hover .overlay ion-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Responsive sizes */
@media (max-width: 1024px) {
  .swiper-slide {
    width: 200px;
    height: 200px;
  }
}
@media (max-width: 768px) {
  .swiper-slide {
    width: 180px;
    height: 180px;
  }
  .modal-box {
    padding-bottom: 30%;
  }
}
@media (max-width: 480px) {
  .swiper-slide {
    width: 150px;
    height: 150px;
  }
}

/* === Hero Fade-In Animation === */
.main-section .hero {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/* When the hero becomes visible */
.main-section .hero.fade-in {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .main-section {
    display: flex;
    align-items: start;
    justify-content: center;
    min-height: 65vh;
    transition: all 1s ease;
  }
  .main-section .hero {
    width: 30%;
    margin: auto 0;
    max-width: 356px;
  }
  .main-section .card {
    width: 70%;
    margin: auto 0;
  }
  #home {
    min-height: 78vh;
  }
}
@media (max-width: 1024px) {
  .main-section {
    display: block;
    /* min-height: 58vh; */
  }
  .main-section .hero {
    width: 100%;
    margin: auto;
    margin-top: 13%;
  }
  .main-section .card {
    width: 100%;
    margin: auto;
  }
  #home.page.active {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    height: 75vh;
  }
}

#hero {
  max-width: 1100px;
}
/* === About Me Slide + Fade Animation (Unified with Hero) === */
.hover-hide-about {
  display: none;
  position: relative;
  opacity: 0;
  transform: translateX(80px); /* desktop default */
  transition:
    opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When shown */
.hover-hide-about.show {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile & tablet — slide up instead */
@media (max-width: 1023px) {
  .hover-hide-about {
    transform: translateY(80px);
  }
  .hover-hide-about.show {
    transform: translateY(0);
  }
}

/* === Scroll To Top Button === */
#scrollTopBtn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  background: linear-gradient(135deg, var(--accent), #38f3ff88);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: all 0.35s ease;
}
#scrollTopBtn:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
#scrollTopBtn ion-icon {
  font-size: 1.6rem;
}
body.light #scrollTopBtn {
  background: linear-gradient(135deg, var(--accent), #3f51b5aa);
}
#scrollTopBtn {
  animation: floatUpDown 3s ease-in-out infinite;
}
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* === Modern Contact Section === */
.contact-modern {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  padding: 4rem 1.5rem;
}

.contact-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.contact-container h2 {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-text {
  color: var(--text);
  opacity: 0.85;
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.contact-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--accent), #38f3ff88);
  color: #fff;
  border-radius: 14px;
  width: 100px;
  height: 100px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.contact-icon ion-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.contact-icon:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.contact-info {
  color: var(--text);
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-info ion-icon {
  color: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
}

/* Responsive layout */
@media (max-width: 600px) {
  .contact-container {
    padding: 2rem 1.25rem;
  }
  .contact-icon {
    width: 90px;
    height: 90px;
  }
  .modal-content {
    display: flex;
    flex-direction: column;
  }
  .modal-info {
    padding: 0;
  }
  .modal-content img {
    width: 100%;
  }
}


body.home-active footer {
  bottom: 0 !important;
  width: 100%;
  position: absolute;
}