/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 1rem;
  overflow-x: hidden;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(120deg, #440000, #000327,#490000, #0d5272);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: rgb(255, 255, 255);
  position: relative;
}

.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* General section padding */
.section {
  padding: 60px 20px;
}

/* Portfolio Description Styling */
.portfolio-section {
  max-width: fit-content;
  margin: 0 auto;
  align-items: start;
}

.portfolio-intro {
  background: rgba(214, 144, 144, 0.199);
  
  padding: 30px;
  border-radius: 10px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #f8f8f8;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}


@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Canvas particles styling */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
  opacity: 0.5;
}

/* Wave background */
.wave-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  color: #a73d0c;
  height: 100px;
  z-index: -5;
  overflow: hidden;
}

.waves {
  width: 200%;
  height: 100%;
  color: #b30808;
  animation: syncedWave 6s ease-in-out infinite;
}

@keyframes syncedWave {
  0% { transform: translateX(0); }
  50% { transform: translateX(-25%); }
  100% { transform: translateX(0); }
}


/* Loader styling */
.loader {
  width: 80px;
  height: 80px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 1000;
}

.loader-outter,
.loader-inner {
  position: absolute;
  border: 4px solid #ffffff;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.loader-outter {
  width: 100%;
  height: 100%;
  border-left-color: transparent;
  animation: rotate 1s cubic-bezier(0.15, 0.61, 0.58, 0.4) infinite;
}

.loader-inner {
  width: 40px;
  height: 40px;
  border-top-color: transparent;
  animation: rotate-reverse 1s cubic-bezier(0.15, 0.61, 0.58, 0.4) infinite;
}

@keyframes rotate {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes rotate-reverse {
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

/* Hide body scroll while loading */
body.loading {
  overflow: hidden;
}

/* Smooth fade-in animations */
.fade-in,
.slide-up,
.zoom-in {
  opacity: 0;
  transition: all 0.8s ease;
}

.fade-in.animated {
  opacity: 1;
  transform: translateY(0);
}

.slide-up.animated {
  opacity: 1;
  transform: translateY(-20px);
}

.zoom-in.animated {
  opacity: 1;
  transform: scale(1);
}


/* === Header === */
header {
  background: #11111100;
  color: #ffffff;
  padding: 0.7rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.397);
}

.header h1{
  color: #1a6e83;
  font-size: 25px;
  font-family: Georgia, 'Times New Roman', Times, serif;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
  font-size: 1.6rem;
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #8a5a00;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.header a {
  text-decoration: none;
}

/* === Sections === */
.section {
  padding: 2rem;
  text-align: center;
}

/* === Project List === */
.project-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

.project-card {
  flex: 1 1 45%;
  max-width: 500px;
  background: rgba(0, 0, 0, 0.733);
  border: 1px solid #08083b22;
  border-left: 5px solid #f0e8dd;
  border-right: 5px solid #f0e8dd;
  border-bottom: 5px solid #f0e8dd;
  border-top: 5px solid #f0e8dd;
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .project-card {
    flex: 1 1 90%;
  }
}

/* === Project Detail Page === */
.project-detail-section {
  background: #111;
  padding: 3rem 1rem;
  max-width: 1000px;
  margin: auto;
}

.project-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 2rem;
}

.project-info h3 {
  margin-top: 1.5rem;
  color: #ddd;
}

.tech-list {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
}

.tech-list li {
  background-color: #222;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* === Buttons === */
.project-links {
  margin-top: 2rem;
}

.project-links .btn,
#backToTop {
  text-decoration: none;
  padding: 10px 20px;
  margin-right: 10px;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  transition: 0.3s;
  cursor: pointer;
}

.btn.live {
  background-color: #4CAF50;
  color: white;
}

.btn.github {
  background-color: #24292e;
  color: white;
}

.btn:hover,
#backToTop:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

/* === Footer === */
footer {
  background: #11111100;
  color: white;
  text-align: center;
  padding: 0;
  margin-top: 6rem;
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.fade-in { animation: fadeIn 1s ease-out forwards; }
.slide-up { animation: slideUp 1s ease-out forwards; }
.zoom-in { animation: zoomIn 1s ease-out forwards; }

.fade-in.delay-1 { animation-delay: 0.2s; }
.fade-in.delay-2 { animation-delay: 0.4s; }
.slide-up.delay-1 { animation-delay: 0.3s; }
.slide-up.delay-2 { animation-delay: 0.6s; }
.zoom-in.delay-1  { animation-delay: 0.5s; }

.animated {
  opacity: 1 !important;
}

/* === Back to Top Button === */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #333;
  color: white;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
    .navMenu {
        position: fixed;
        top: 70px;
        right: -100%; /* menu initially off-screen to the right */
        flex-direction: column;
        background: linear-gradient(135deg, #1a6a8d00, #792c1500, #2c536400);
        background-size: 300% 300%;
        animation: gradientMove 8s ease infinite;
        width: 50vw; /* 50% of the viewport width */
        height: calc(100vh - 70px);
        text-align: left;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.363);
        padding: 2rem 1.5rem;
    }

    .navMenu a {
  display: block;
  background: rgba(32, 49, 145, 0.438);
  padding: 8px 20px;
  margin: 3px 0;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.navMenu a:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
  color: #c59700;
}


    .navMenu.active {
        right: 0;
    }

    .nav-item {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.project-list {
  flex-direction: column;
  align-items: center;
}

.project-card {
  width: 90%;
  }

.project-detail-section {
    padding: 2rem 1rem;
  }

.project-links .btn {
    margin-bottom: 10px;
  
}

/* === Loader Styles === */
#loader {
  position: fixed;
  width: 70px;
  height: 70px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: transparent;
}

.loader {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  position: relative;
}

.loader-outter,
.loader-inner {
  position: absolute;
  border: 4px solid #fff;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.loader-outter {
  width: 100%;
  height: 100%;
  border-left-color: transparent;
  animation: rotate 1s cubic-bezier(0.15, 0.61, 0.58, 0.4) infinite;
}

.loader-inner {
  width: 35px;
  height: 35px;
  border-top-color: transparent;
  animation: rotate-reverse 1s cubic-bezier(0.15, 0.61, 0.58, 0.4) infinite;
}

    .hero {
      padding: 3rem 1rem;
      text-align: center;
      max-width: 900px;
      margin: auto;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 20px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .contact {
      padding: 3rem 1rem;
      text-align: center;
      max-width: 900px;
      margin: auto;
      background: rgba(255, 255, 255, 0.986);
      border-radius: 20px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .contact p {
      color: #000;
      font-size: 1rem;
      opacity: 0.9;
    }

    .hero h1 {
      font-size: 2.8rem;
      margin-bottom: 1rem;
    }

    .hero p {
      font-size: 1.1rem;
      opacity: 0.9;
    }

    .services {
      max-width: 1100px;
      margin: 4rem auto;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 2rem;
      padding: 0 2rem;
    }

    .card {
      background: rgba(255, 255, 255, 0.05);
      padding: 1.5rem;
      border-radius: 15px;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .card:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    }

    .card h3 {
      margin-bottom: 0.7rem;
      font-size: 1.3rem;
    }

    .card ul {
      list-style: square inside;
      opacity: 0.9;
    }

    footer {
      text-align: center;
      padding: 2rem;
      font-size: 0.9rem;
      opacity: 0.7;
    }

    @media (max-width: 768px) {
      .hero h1 {
        font-size: 2rem;
      }

      .services {
        grid-template-columns: 1fr;
      }
    }

.typewriter-container {
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  border-right: 2px solid #ffffff;
  white-space: nowrap;
  overflow: hidden;
  width: fit-content;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { border-color: #fff; }
  50% { border-color: transparent; }
}

.hero-section {
  height: 77vh; /* Full screen */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2; /* Above background canvas */
  text-align: center;
}

.hero-name {
  font-size: 50px;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: #8f8484;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
 .about-section {
      max-width: 1400px;
      height: 74vh;
      margin: auto;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 40px;
    }

    .about-text {
      flex: 1;
      min-width: 300px;
    }

    .about-text h1 {
      color: #36a1af;
      font-size: 36px;
      font-family: Georgia, 'Times New Roman', Times, serif;
      border-bottom: 3px solid #000000;
      display: inline-block;
      padding-bottom: 5px;
      margin-bottom: 20px;
    }

    .about-text h3 {
      font-family: Georgia, 'Times New Roman', Times, serif;
      font-size: 25px;
      color: #14aa78;
      margin-bottom: 12px;
    }

    .about-text p {
      line-height: 1.6;
      margin-bottom: 12px;
      color: #e2baba;
      font-family: 'Times New Roman', Times, serif;
    }

    .about-image img {
      width: 350px;
      height: auto;
      border-radius: 5px;
      object-fit: cover;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    @media (max-width: 600px) {
      .about-title {
        font-size: 20px;
      }
      .about-text {
        font-size: 15px;
      }
    }

    *,
*:after,
*:before {
	box-sizing: border-box;
}

:root {
	--x: 0;
	--y: 0;
	--xp: 0;
	--yp: 0;
	--hue: calc(0 + (var(--xp) * 500));
	--bg: hsl(0, 5%, 22%);
	--size: 100px;
	--glow: radial-gradient(50% 50% at center,
			hsl(var(--hue) 80% 85%),
			hsl(var(--hue) 80% 70%),
			transparent) calc((var(--x) * 1px) - (var(--size) * 0.5)) calc((var(--y) * 1px) - (var(--size) * 0.5)) / var(--size) var(--size) no-repeat fixed;
}
.controls {
	position: fixed;
	top: 2rem;
	right: 2rem;
}

button {
	border-radius: 1rem;
	text-transform: uppercase;
	font-weight: bold;
	letter-spacing: 0.1ch;
	background: var(--bg);
	border: 4px solid transparent;
	box-shadow: 0 1px hsl(0 0% 100% / 0.15) inset;
	cursor: pointer;
	background:
		linear-gradient(var(--bg), var(--bg)) padding-box,
		var(--glow),
		linear-gradient(black, black) border-box;
	transition: background-size 0.24s;
	touch-action: none;
	position: relative;
	padding: 1rem 2rem;
}
button::before {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: 0 1px hsla(0, 0%, 100%, 0.226) inset;
	background: var(--bg);
	z-index: 2;
	border-radius: 1rem;
}
button span {
	background: var(--glow), black;
	background-clip: text;
	color: transparent;
	height: 100%;
	width: 100%;
	z-index: 2;
	position: relative;
	inset: 0;
}
:root:has(button:active) {
	--size: 300px;
}
button::after {
	content: "";
	position: absolute;
	inset: -4px;
	filter: blur(20px);
	border: 4px solid transparent;
	background: var(--glow);
	border-radius: 1rem;
}