/* =====================================
   Base Reset & Global Styles
   ===================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px 140px;
}

/* =====================================
   Navigation Bar
   ===================================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(18, 18, 18, 0.9);
  border-bottom: 2px solid #80bfff;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #80bfff;
  text-decoration: none;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: #e0e0e0;
  font-size: 1.1rem;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #ff9100;
  transition: width 0.5s ease-in-out;
}

.nav-link:hover::after {
  width: 100%;
}

/* =====================================
   Scroll Progress Bar
   ===================================== */
#progressBar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 0%;
  height: 4px;
  background: #80bfff;
  z-index: 1001;
}

/* =====================================
   Hero Section
   ===================================== */
.hero {
  position: relative;
  background: url('img/header-bg.jpg') center/cover no-repeat;
  margin-top: 120px;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
}

.hero-logo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 4px solid #80bfff;
  margin: 20px;
  animation: zoomIn 1s ease-out;
  flex-shrink: 0;
}

@keyframes zoomIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hero-text {
  max-width: 50%;
  margin: 20px;
  text-align: left;
  font-size: 1.4rem;
  line-height: 1.6;
}

.hero-text .single-line {
  font-size: 1.6rem;
  font-weight: bold;
  color: #80bfff;
  white-space: normal;
  overflow: visible;
  text-shadow: 0 2px 10px rgba(128, 191, 255, 0.5);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.hero-text:hover .single-line {
  color: #ff9100;
  text-shadow: 0 4px 20px rgba(255, 145, 0, 0.8);
}

/* =====================================
   Sections & Headings
   ===================================== */
section {
  margin-bottom: 60px;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
  color: #80bfff;
  position: relative;
}

h2::after {
  content: '';
  width: 80px;
  height: 4px;
  background: #80bfff;
  display: block;
  margin: 10px auto;
}

/* =====================================
   Grid Layout for Project Cards
   ===================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #1e1e1e;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateX(-50px);
}

.card.animate {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card:hover {
  transform: translateX(-10px);
  box-shadow: 0 10px 20px rgba(0, 234, 255, 0.4);
}

.card-image img {
  width: 100%;
  display: block;
  border-bottom: 2px solid #80bfff;
}

.card-content {
  padding: 20px;
}

.card-tag {
  display: inline-block;
  background: #80bfff;
  color: #121212;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.card-description {
  font-size: 1rem;
  color: #b0b0b0;
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.project-link {
  background: rgba(128, 191, 255, 0.1);
  color: #80bfff;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid #80bfff;
}

.project-link:hover {
  background: #80bfff;
  color: #121212;
  transform: translateY(-2px);
}

/* =====================================
   Resume Section
   ===================================== */
.resume {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.resume.animate {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#resumeButton {
  background: linear-gradient(45deg, #80bfff, #ff9100);
  color: #121212;
  border: none;
  padding: 15px 30px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#resumeButton:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 234, 255, 0.4);
}

/* =====================================
   About Section
   ===================================== */
.about {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.about.animate {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: #b0b0b0;
}

/* =====================================
   Candle Section (At the end of the page)
   ===================================== */
.candle-container {
  text-align: center;
  margin: 40px 0;
}

.candle {
  position: relative;
  width: 20px;
  height: 80px;
  background-color: #fff;
  margin: 0 auto;
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.candle .flame {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #ffcc00 0%, #ff6600 60%, transparent 70%);
  border-radius: 50%;
  animation: flicker 1.5s infinite;
}

.spark {
  position: absolute;
  bottom: 100%;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #ffcc00 0%, #ff6600 60%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: sparkUp 2s forwards;
}

/* =====================================
   Scrolling Footer
   ===================================== */
.footer {
  background: #1e1e1e;
  padding: 20px;
  text-align: center;
}

/* =====================================
   Fixed Permanent Bottom Bar (smaller width with numbers)
   ===================================== */
.fixed-bottom-bar {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 35%;
  background-color: #333;
  padding: 10px 20px;
  border-radius: 10px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1100;
}

.bottom-link {
  background-color: #FFC107;
  color: #121212;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bottom-link:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.7);
}

/* =====================================
   Custom CSS Animations
   ===================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

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

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateX(-50%) translateY(-3px) scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes sparkUp {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -100px) scale(1.5);
  }
}

/* =====================================
   Utility: Animate on Scroll
   ===================================== */
.animate {
  opacity: 1 !important;
  transform: translate(0) !important;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* For dark mode: images get a white background */
@media (prefers-color-scheme: dark) {
  .card-image img {
    background-color: #ffffff;
  }
}

/* For light mode: images get a dark background */
@media (prefers-color-scheme: light) {
  .card-image img {
    background-color: #1e1e1e;
  }
}

/* =====================================
   Mobile Responsive Adjustments
   ===================================== */
@media (max-width: 768px) {
  .container {
    padding: 60px 10px 80px;
  }

  .nav-container {
    flex-direction: column;
  }

  .nav-menu {
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  .hero-logo {
    width: 200px;
    height: 200px;
    margin-bottom: 15px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-text h3 {
    font-size: 1.2rem;
  }

  .fixed-bottom-bar {
    width: 90%;
    padding: 8px 10px;
  }

  .bottom-link {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .fullstack-grid {
    grid-template-columns: 1fr;
  }
  
  .fullstack-card {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text h3 {
    font-size: 1rem;
  }

  .nav-logo {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .card-description {
    font-size: 0.9rem;
  }
  
  .fullstack-title {
    font-size: 1.5rem;
  }
  
  .tech-tag {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .fullstack-tech-stack {
    gap: 10px;
  }
}

/* Reset for the about section */
#about {
  position: relative;
  padding: 50px 20px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #e0f7fa);
  border-radius: 10px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

/* Rotating background effect */
#about::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  transform: rotate(45deg);
  animation: rotate-bg 10s infinite linear;
  z-index: -1;
}

@keyframes rotate-bg {
  0% {
    transform: rotate(0deg);
  }

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

/* Styling for the heading */
#about h2 {
  font-size: 2.5rem;
  color: #00796b;
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

/* Underline animation for the heading */
#about h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #00796b;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease-in-out;
}

#about:hover h2::after {
  transform: scaleX(1);
}

/* Paragraph styling */
#about p {
  font-size: 1.2rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

/* Fade-in effect when scrolled into view */
#about.animate-on-scroll p {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effect for scaling and shadow */
#about:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

/* Glowing border effect on hover */
#about:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #00bcd4;
  border-radius: 10px;
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 10px #00bcd4, 0 0 20px #00bcd4, 0 0 30px #00bcd4;
  }

  100% {
    box-shadow: 0 0 20px #00bcd4, 0 0 30px #00bcd4, 0 0 50px #00bcd4;
  }
}

/* =====================================
   Fullstack Projects Section
   ===================================== */
.fullstack {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  margin-bottom: 80px;
}

.fullstack.animate {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fullstack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.fullstack-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 20px;
  padding: 40px 30px;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 2px solid transparent;
  opacity: 0;
  transform: translateY(30px);
}

.fullstack-card.animate {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fullstack-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.fullstack-card:hover::before {
  left: 100%;
}

.fullstack-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: #80bfff;
  box-shadow: 0 20px 40px rgba(128, 191, 255, 0.3);
}

.fullstack-card-content {
  position: relative;
  z-index: 2;
}

.fullstack-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, #80bfff, #ff9100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

.fullstack-icon svg {
  width: 40px;
  height: 40px;
  color: #ffffff;
}

.fullstack-title {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #80bfff, #ff9100);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fullstack-description {
  font-size: 1.1rem;
  color: #b0b0b0;
  line-height: 1.7;
  margin-bottom: 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.fullstack-tech-stack {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.tech-tag {
  background: rgba(128, 191, 255, 0.1);
  color: #80bfff;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  border: 1px solid #80bfff;
  transition: all 0.3s ease;
}

.fullstack-card:hover .tech-tag {
  background: #80bfff;
  color: #121212;
  transform: translateY(-2px);
}

/* Add shine effect */
.fullstack-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  transform: rotate(45deg);
  animation: rotate-shine 15s infinite linear;
  pointer-events: none;
}

@keyframes rotate-shine {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}