* {
  padding: 0;
  margin: 0;

  box-sizing: border-box;
}

body {
  line-height: 1.6;
  padding: 20px;
  background: rgb(0, 0, 22);
  background-repeat: repeat-x;
  font-family: codeman;
  cursor: pointer;
  color: aliceblue;
  font-size: 20px;
  margin: 0 auto;
}
/* Navigation links */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto; /* Enable horizontal scroll if needed */
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

/* Make nav scrollable and prevent wrapping on smaller screens */
@media (max-width: 768px) {
  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}
.nav-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: aliceblue;
  transform: scaleX(0);
  transition: all 1s;
  transform-origin: left;
  border: 2px double rgb(8, 7, 0);
}

.nav-links ul li a:hover::before,
.nav-links ul li a:hover::after {
  transform: scaleX(1);
  color: #00ffff;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;

  height: 2px;
  background: aliceblue;
  transform: scaleX(0);
  transition: all 1s;
  transform-origin: right;
  border: 2px double rgb(8, 7, 0);
}
.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  background-color: #050027;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Container for each section */
main {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

section {
  background: #ffffff02;
  margin-bottom: 40px;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Section Headings */
section h1,
section h2 {
  color: #007bff;
  margin-bottom: 15px;
  text-align: center;
  font-family: tahoma;
  font-size: 35px;
}
#welcome-section {
  display: flex;
  justify-content: space-between;
  align-content: center;
  flex-direction: row;
  text-align: center;
  margin-top: 80px;
  flex-wrap: wrap;
}

.typing {
  overflow: hidden;
  border-right: 0.15em solid #00f;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.1em;
  animation: typing 3s steps(30, end), blink 0.75s step-end infinite;
  font-size: 20px;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #00f;
  }
}

#welcome-section h1,
h2,
h3 {
  font-family: "Poppins", sans-serif;
  text-align: center;
  color: #00bfff;
  text-shadow: 0 0 10px rgba(0, 191, 255, 0.7);
  margin: 10px 0;
}

h3 {
  color: #00ffff;
  font-weight: 700;
  font-size: 2rem;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

p {
  color: #e0e0e0;
  font-family: "Raleway", sans-serif;
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  margin-top: 10px;
}
.fade-in {
  opacity: 0;
  animation: fadeIn 1.5s ease-in forwards;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns */
  gap: 20px;
  padding: 20px;
}

.card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  height: 300px; /* Fixed height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card img {
  height: 150px; /* Fixed image height */
  width: 100%;
  object-fit: cover; /* This keeps the image from stretching */
}

.card h3,
.card p {
  margin: 10px;
  font-size: 14px;
  text-align: center;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.image {
  width: 300px;

  align-self: right;
  padding-right: 0;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 153, 255, 0.6);
  filter: brightness(1.1);
}
.glow-text {
  color: rgba(8, 175, 252, 0.49);
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 2px #00aaff, 0 0 3px #00aaff, 0 0 5px #00aaff,
    0 0 10px #a64dff;
}

/* Paragraph and Labels */
section p,
section label {
  font-size: 25px;
  margin-bottom: 15px;
  display: block;
  text-align: justify;
  font-family: ta;
}

/* List Styling */
ul {
  margin-top: 10px;
  padding-left: 20px;
}

ul li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Highlighted keywords */
b {
  color: lightblue;
}
header h1 {
  background-color: rgba(8, 175, 252, 0.42);
  border-radius: 50%;
  width: 70px;
  text-align: center;
  text-shadow: 0 0 2px gray, 0 0 3px #00aaff, 0 0 5px #ffff, 0 0 10px #a64dff;
}

footer {
  background: inherit;
  color: #ffffff;
  text-align: center;
  padding: 15px 0;
  font-size: 1rem;
  position: relative;
  bottom: 0;
  width: 100%;
}

.footer-links {
  margin-top: 8px;
  font-size: 35px;
}

.footer-links a {
  color: #58a6ff;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
}
section:hover {
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
  transition: 0.3s ease;
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-in forwards;
}
.sp {
  color: #007bff70;
}
em {
  color: rgba(185, 252, 124, 0.51);
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.footer-links a:hover {
  font-size: large;
  transition: all 1s;
}
hr {
  border-radius: 50%;
  border: 1px solid lightblue;
  height: 3px;
}
form input,
form textarea {
  width: 90%;
  padding: 0.8rem;
  margin-bottom: 15px;
  border: 1px solid #5a5656;
  border-radius: 10px;
  height: 50px;
  background-color: #181717;
  color: aliceblue;
  margin: 20px;
  font-size: 16px;
  resize: none;
}

#contact h1 {
  color: blue;
  margin: 10px;
}

form button {
  padding: 1rem 2rem;
  background: rgba(2, 2, 253, 0.82);
  color: aliceblue;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  font-size: 1.5rem;
  transition: all 0.2s;
  border-radius: 100px;
  position: relative;
  margin: auto;
  z-index: 1;
}
form {
  /* Contact Form Container */

  background: rgb(0, 0, 22);
  padding: 30px 40px;
  max-width: 700px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(245, 238, 238, 0.1);
  margin-bottom: 50px;
}
form button:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(192, 192, 243, 0.824);
  border-radius: 100px;
  transition: all 1s;
  z-index: -1;
}

form button:hover::before {
  transform: scaleX(1.4) scaleY(1.6);
  opacity: 0;
}

form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

form button:active {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 5px, 10px, 0.2);
}

form input,
form textarea {
  font-size: 14px;
}
#projects {
  padding: 60px 20px;
  text-align: center;
}

#projects h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #007bff;
}
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.project a {
  text-decoration: none;
}

.card {
  flex: 1 1 250px;
  max-width: 300px;
  background: #fff;
  border: 2px solid #007bff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.2);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3 {
  color: #007bff;
  margin: 15px 0 10px;
  font-size: 20px;
}

.card p {
  color: #333;
  font-size: 14px;
  padding: 0 10px 15px;
}

/* Header layout */
.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  background-color: inherit;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}
.info-text,
.success-text,
.error-text {
  display: none;
  font-size: 0.95rem;
}

.success-text {
  color: green;
}

.error-text {
  color: red;
}

.info-text {
  color: #555;
}
/* Make nav scrollable and prevent wrapping on smaller screens */

.fade-in {
  font-size: 1rem;
  font-weight: 500;
  color: white;
  white-space: nowrap; /* Prevent wrap on small screens */
  animation: fadeIn 2s ease-in-out forwards;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adjust font size on smaller screens */
/* 1.responsive Extra Small Devices */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  .nav-links {
    gap: 1rem;
    font-size: 12px;
  }
  .projects-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .image {
    width: 50px;

    align-self: right;
    padding-right: 0;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.6);
    filter: brightness(1.1);
  }
  header h1 {
    background-color: rgba(8, 175, 252, 0.42);
    border-radius: 50%;
    width: 30px;
    text-align: center;
    text-shadow: 0 0 2px gray, 0 0 3px #00aaff, 0 0 5px #ffff, 0 0 10px #a64dff;
    font-size: 0.9rem;
    margin-right: 20px;
  }
  .tech-stack {
    display: none;
  }
}

/* 2. Small Devices */
@media (min-width: 481px) and (max-width: 767px) {
  .nav-links {
    flex-direction: row;
    overflow-x: auto;
  }
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  header h1 {
    background-color: rgba(8, 175, 252, 0.42);
    border-radius: 50%;
    width: 40px;
    text-align: center;
    text-shadow: 0 0 2px gray, 0 0 3px #00aaff, 0 0 5px #ffff, 0 0 10px #a64dff;
    font-size: 1.5rem;
    margin-right: 20px;
  }
  .image {
    width: 70px;

    align-self: right;
    padding-right: 0;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.6);
    filter: brightness(1.1);
  }
  .tech-stack {
    display: none;
  }
  section {
    width: 90%;
    font-size: medium;
  }
}

/* 3. Medium Devices */
@media (min-width: 768px) and (max-width: 991px) {
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .image {
    width: 120px;

    align-self: flex-end;
    padding-right: 0;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.6);
    filter: brightness(1.1);
  }
  header h1 {
    background-color: rgba(8, 175, 252, 0.42);
    border-radius: 50%;
    width: 100px;
    text-align: center;
    text-shadow: 0 0 2px gray, 0 0 3px #00aaff, 0 0 5px #ffff, 0 0 10px #a64dff;
    font-size: 2rem;
    margin-right: 30px;
  }
  .tech-stack {
    margin-right: 20px;
  }
  section {
    width: 90%;
    font-size: medium;
  }
}

/* 4. Large Devices */
@media (min-width: 992px) and (max-width: 1199px) {
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 5. Extra Large Devices */
@media (min-width: 1200px) and (max-width: 1440px) {
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 6. Ultra Wide Screens */
@media (min-width: 1441px) {
  .projects-grid {
    max-width: 1400px;
    margin: 0 auto;
  }
}
@media (max-width: 768px) {
  #welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #welcome-section img.image {
    order: -1; /* puts the image at the top */
    width: 150px; /* optional: adjust size for small screens */
    border-radius: 50%; /* optional  */
    margin-bottom: 1rem; /* space between image and text */
  }
}
