:root{
  --bg: #ffffff;
  --text: #131e35;
  --muted: #6b7280;
  --accent: #0ea5a4;
  --card: #f9fafb;
}

.theme-dark{
  --bg: #0c2229;
  --text: #fff;
  --muted: #9aa7b6;
  --accent: #22c1c3;
  --card: #0c2229;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  padding-top: 150px; /* match the header height */
 
}

a:link,
a:visited,
a:active {
  text-decoration: none;
}

a:link {
  color: #0ea5a4; /* Unvisited link */
}
a:visited {
  color: purple; /* Visited link */
}
a:hover {
  text-decoration: underline; /* Re-add underline on hover */
  color: #c59607; /* Link on hover */
}
a:active {
  color: #836407; /* Link when clicked */
}

.container{ max-width:1100px; margin:0 auto; padding:1rem; }

.site-header {
  position: fixed;          /* makes it float on top */
  top: 0;                   /* stick to the top edge */
  left: 0;
  width: 100%;              /* full width */
  background:var(--card); /* subtle transparency */
  background: rgba(20, 20, 30, 0.1); /* translucent */
  z-index: 1000;            /* ensure it stays above content */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px); /* adds a modern frosted-glass effect */
  -webkit-backdrop-filter: blur(10px);
  transition: top 0.4s ease-in-out;
}

/* Slightly darker and more solid when scrolled */
.site-header.scrolled {
  background: rgba(20, 20, 30, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* When hidden, slide header up */
.site-header.hide {
  top: -165px; /* adjust depending on header height */
}

/* style your nav links */
.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.site-header ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
}

.site-header a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Scroll progress bar container */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;                /* thickness of the bar */
  width: 0%;                  /* start at 0 */
  background: linear-gradient(to right, #00bcd4, #ffd700);
  z-index: 2000;              /* above everything, including header */
  transition: width 0.1s ease-out, background 0.3s ease;
}

/* Dark Mode Progress Bar */
body.dark-mode #scrollProgress {
  background: linear-gradient(to right, #4fc3f7, #ffc107); /* softer cyan/yellow for dark theme */
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}

/* Optional shadow for subtle depth */
#scrollProgress::after {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding-top: 150px; /* adjust to actual mobile header height */
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    background: rgba(20, 20, 30, 0.95);
    flex-direction: column;
    align-items: start;
    gap: 1rem;
    padding: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
    color: #ffd700;
  }

  .hero p{ width: 100%; }
}

.site-header a:hover {
  color: #00bcd4;
}

.header-grid{ display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 0; }
.brand{ display:flex; gap:0.75rem; align-items:center;}
.avatar{ width:56px; height:56px; border-radius:8px; object-fit:cover; }

.nav a { 
  margin-right:0.75rem; 
  text-decoration:none; 
  color: #000; /* black text */; 
  transition: color 0.3s ease;
}

.nav a:hover {
  color: #0292a5; /* accent on hover */
}

.nav a:active,
.nav a:focus {
  color: #000; /* stay black when clicked */
}

.nav a.active {
  border-bottom: 2px solid #00bcd4;
}

/* Dark theme */
.theme-dark .nav a {
  color: #fff;
}

.theme-dark .nav a:hover {
  color: #ffd700;
}

.theme-dark .nav a:active,
.theme-dark .nav a:focus {
  color: #fff; /* stay white when clicked */
}

.theme-dark .nav a.active {
  border-bottom: 2px solid #ffd700;
}

.nav .btn-toggle{ 
  background: linear-gradient(to right, #00bcd4, #ffd700);
  border: none;
  outline: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
}

/* Hover & focus effects */
.btn-toggle:hover,
.btn-toggle:focus {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.7), 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Icons */
.btn-toggle .icon {
  position: absolute;
  font-size: 20px;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Light mode (sun visible) */
.btn-toggle .sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}



.btn-toggle .moon {
  opacity: 0;
  transform: rotate(-180deg) scale(0.5);
}

/* Dark mode (moon visible) */
body.dark-mode .btn-toggle {
  background: linear-gradient(to right, #4fc3f7, #ffc107);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

body.dark-mode .btn-toggle .sun {
  opacity: 0;
  transform: rotate(180deg) scale(0.5);
}

body.dark-mode .btn-toggle .moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.hero{ padding:2rem 0; }
.hero h2{ margin:0 0 .5rem; font-size:1.6rem; }
.hero p{ width: 70%; padding-bottom: 10px; }
.cta .btn{ margin-right:1rem; padding:0.6rem 1rem; border-radius:8px; text-decoration:none; background:var(--accent); color:white;}
.btn-outline{ border:1px solid var(--accent); background:transparent; color:var(--text); padding:0.5rem 0.9rem; }

.skills{ margin-top:1.2rem; }
.skills ul{ list-style: none; padding:0; margin:0; display:grid; gap:0.4rem; }

.grid{ display:grid; gap:1rem; }
.projects-grid{ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); grid-auto-rows: auto; display:grid; }

.card{ background:var(--card); border-radius:12px; overflow:hidden; box-shadow: 0 6px 18px rgba(10,20,30,0.04); }
.card img{ width:100%; height:160px; object-fit:cover; display:block;}
.card-body{ padding:0.9rem; }
.card .muted{ color:var(--muted); font-size:0.95rem;}
.tag{ display:inline-block; font-size:0.8rem; margin-right:0.4rem; margin-top:0.5rem; padding:0.2rem 0.4rem; border-radius:6px; background:rgba(0,0,0,0.04);}

.card-actions{ margin-top:0.7rem; }

.site-footer{ border-top:1px solid rgba(0,0,0,0.06); padding:1rem 0; text-align:center; color:var(--muted); font-size:0.9rem; }
label{ display:block; margin-bottom:0.6rem; }
input, textarea{ width:100%; padding:0.6rem; border-radius:8px; border:1px solid rgba(0,0,0,0.08); background:transparent; color:var(--text); }
textarea{ min-height:120px; resize:vertical; }

@media (max-width:720px){
  .header-grid{ flex-direction:column; align-items:flex-start; gap:0.6rem; }
  .nav{ display:flex; gap:0.5rem; flex-wrap:wrap; }
}
.project-detail{
  max-width:800px;
  margin:2rem auto;
  text-align:left;
}
.detail-image{
  width:100%;
  max-height:360px;
  object-fit:cover;
  border-radius:12px;
  margin:1rem 0;
}
.back-link{
  display:inline-block;
  margin-bottom:1rem;
  text-decoration:none;
  color:var(--accent);
}

.contact-form {
  border: 1px solid #c59607; 
  border-radius: 10px; /* Adjust the value for desired roundness */
  padding: 20px; /* For better visual spacing */
}

.contact-form input[type="text"] {
  border: 1px solid rgba(0, 188, 212, 0.7); 
  border-radius: 5px; /* Adjust the value for desired roundness */
  padding: 8px; /* For better visual spacing */
}

.contact-form input[type="email"] {
  border: 1px solid rgba(3, 122, 138, 0.7); 
  border-radius: 5px; /* Adjust the value for desired roundness */
  padding: 8px; /* For better visual spacing */
}

.contact-form textarea {
  border: 1px solid rgba(1, 69, 78, 0.7); 
  border-radius: 3px; /* Adjust the value for desired roundness */
  padding: 8px; /* For better visual spacing */
}

.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 20px;
  background-color: linear-gradient(to bottom, #4fc3f7, #ffc107);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 999;
}

.back-to-top.show,
.whatsapp-float.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.back-to-top:hover img {
  transform: translateY(-3px);
}

/* Dark mode */
body.dark-mode .back-to-top {
  background: linear-gradient(to right, #4fc3f7, #ffc107);
  color: #111;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Floating WhatsApp button */
.whatsapp-float {
  position: fixed;
  bottom: 90px; /* sits below the back-to-top button */
  right: 25px;
  width: 54px;
  height: 54px;
  background: linear-gradient(to right, #4fc3f7, #ffc107);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  transition: transform 0.3s, box-shadow 0.3s;
  pointer-events: none; /* <— this disables clicks when hidden */
}

/* Enable pointer events when visible */
.whatsapp-float.show {
  cursor: pointer;
  pointer-events: auto; /* <— must be here! */
}

.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.whatsapp-float img {
  width: 28px;
  height: 28px;
}

/* 🌙 Dark mode variant */
.theme-dark .whatsapp-float {
  background: linear-gradient(135deg, #ffd700, #00bcd4);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

/* Hidden by default */
.whatsapp-float {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  transition: all 0.4s ease;
}

/* Positioning */
.back-to-top { bottom: 30px; }
.whatsapp-float { bottom: 100px; }

/* Stagger effect */
.back-to-top { transition-delay: 0.35s; }
.whatsapp-float { transition-delay: 0.1s; }

/* Gradient pulse animation (accent-matched) */
@keyframes pulseAccent {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(79, 195, 247, 0.6); /* #4fc3f7 */
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 16px 10px rgba(255, 193, 7, 0); /* #ffc107 */
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(79, 195, 247, 0);
  }
}

/* Pulse only when visible */
.whatsapp-float.show img {
  animation: pulseAccent 2.5s infinite ease-in-out;
}

/* Hover: pause animation, highlight softly */
.whatsapp-float:hover img {
  animation: none;
  transform: scale(1.1);
  box-shadow: 0 0 16px 6px rgba(255, 193, 7, 0.3);
}

/* Keyframes for fade-in + slide-up */
@keyframes footerFadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Default (light theme) footer */
footer {
  background-color: #daf5f2; /* Teal 500 */
  color: #ffffff;
  padding: 40px 0;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  z-index: 10;
  opacity: 0; /* start hidden */
  animation: footerFadeUp 0.8s ease-out 0.2s forwards;
}

/* Gradient border separator */
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #4fc3f7, #ffc107);
}

/* Footer links */
footer a {
  color: #ffd700;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  text-decoration: underline;
}

/* Dark theme footer */
.theme-dark footer {
  background-color: #0c2229; /* Teal 900 */
  color: #e0f2f1;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Dark mode gradient border */
.theme-dark footer::before {
  background: linear-gradient(to right, #80deea, #ffca28);
}

.theme-dark footer a {
  color: #ffc107;
}

/* Social links section */
footer .social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

/* Social icon styling */
footer .social-links img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(1);
  border-radius: 50%;
}

/* Hover effects */
footer .social-links img:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px 4px rgba(79, 195, 247, 0.6),
              0 0 18px 8px rgba(255, 193, 7, 0.3);
  filter: brightness(1.2);
}

/* Adjust color visibility in dark mode */
.theme-dark footer .social-links img {
  filter: brightness(0.9);
}

.theme-dark footer .social-links img:hover {
  box-shadow: 0 0 14px 5px rgba(128, 222, 234, 0.6),
              0 0 18px 8px rgba(255, 202, 40, 0.3);
  filter: brightness(1.3);
}

/* === Project Categories Section === */
#project-categories {
  background: var(--background);
  color: var(--text);
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #0ea5a4; /* Teal accent */
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 1.5rem auto;
  max-width: 1000px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.category-title {
  font-size: 1.4rem;
  color: #037065; /* Deep teal heading */
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title::before {
  content: "▹";
  color: #7c6b0a; /* Golden accent */
  font-weight: bold;
}

.category-list {
  list-style: none;
  padding-left: 1.2rem;
  margin: 0;
  list-style-type: none;
}

.category-list li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  position: relative;
}

.category-list li::before {
  color: #011a1d;
  position: absolute;
  left: -1rem;
  top: 0.2rem;
  font-size: 1.2rem;
}

.category-list strong {
  color: #1a1603;
  font-weight: 600;
}

/* === Dark Mode Support === */
.theme-dark #project-categories {
  background: #101820;
  color: #eaeaea;
}

.theme-dark .category {
  background: #182530;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.theme-dark .category-title {
  color: #d8d0a6;
}

.theme-dark .category-list strong {
  color: #4fc3f7;
}

.skills li {
  color: #1a1603;
}

.theme-dark .skills li {
  color: #d8d0a6;
}

.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 80px 20px;
  background: var(--background);
  color: var(--text);
}

.hero-content {
  flex: 1 1 50%;
  min-width: 300px;
}

.hero-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #00bcd4;
}

.hero-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-canvas {
  flex: 1 1 40%;
  min-width: 300px;
  display: flex;
  justify-content: center;
}

#heroCanvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: radial-gradient(circle at center, #002b36 10%, #001b22 90%);
  box-shadow: 0 0 25px rgba(0, 188, 212, 0.2);
  filter: drop-shadow(0 0 6px #ffd700) brightness(1.1);
}

/* Responsive: stack vertically on mobile */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
  }

  .hero-canvas {
    margin-top: 1.5rem;
  }
}
/*-------- Single Project View --------------*/
.project-details {
  max-width: 900px;
  margin: 80px auto;
  padding: 2rem;
  color: var(--text-color);
  animation: fadeIn 0.8s ease;
}

.project-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.project-image {
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 146, 165, 0.4);
}

.project-header {
  flex: 1;
}

.project-title {
  font-size: 2.2rem;
  color: rgba(4, 146, 165, 0.9);
  margin: 0 0 0.3rem;
}

.project-category {
  font-weight: 600;
  color: #857208;
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  list-style-type: none;
}

.tech-list li {
  background: rgba(0, 188, 212, 0.15);
  border: 1px solid rgba(0, 188, 212, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #857208;
}

.project-links .btn {
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  margin-right: 1rem;
  border-radius: 6px;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.project-short {
  color: #857208;
}

.demo-btn {
  background: #00bcd4;
}

.code-btn {
  background: #ad950a;
  color: #000;
}

.demo-btn:hover,
.code-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.back-button {
  background: none;
  color: var(--text-color);
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.back-button:hover {
  opacity: 1;
}

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

/* Smooth route transitions */
.ng-enter, .ng-leave {
  transition: all 0.5s ease;
  display: block;
}

/* Fade & slide in when entering */
.ng-enter {
  opacity: 0;
  transform: translateY(20px);
}

.ng-enter-active {
  opacity: 1;
  transform: translateY(0);
}

/* Fade & slide out when leaving */
.ng-leave {
  opacity: 1;
  transform: translateY(0);
}

.ng-leave-active {
  opacity: 0;
  transform: translateY(-20px);
}



.back-btn {
  background: linear-gradient(to right, #0295a8, #8d7802);
  color: #fff;
  border: none;
  padding: 0.6em 1.2em;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* -------------------------------------- */

.puzzle-section {
  display: block;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 10px 0px;
  background: var(--background);
  color: var(--text);
}


.puzzle-canvas {
  flex: 1 1 40%;
  min-width: 300px;
  margin-top: 50px;
  display: flex;
  justify-content: center;
  cursor: pointer;
}

#puzzleCanvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: radial-gradient(circle at center, #002b36 10%, #001b22 90%);
  box-shadow: 0 0 25px rgba(0, 188, 212, 0.2);
  filter: drop-shadow(0 0 6px #ffd700) brightness(1.1);
}

/* Responsive: stack vertically on mobile */
@media (max-width: 768px) {
  .puzzle-section {
    flex-direction: column;
    text-align: center;
  }

  .puzzle-canvas {
    margin-top: 1.5rem;
  }
}