* {
  margin: 0;
  padding: 0;
  font-family: 'Times New Roman', Times, serif;
  box-sizing: border-box;
}

body {
  background: black;
  color: white;
}

#header {
  width: 100%;
  height: 100vh;
  background-image: url(images/background.png);
  background-size: cover;
  background-position: center;
}

.container {
  padding: 10px 10%;
}

.header-text {
  display: inline-block;
  margin-top: 130px;
}

.text {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  border-right: 5px solid #ffcc00;
  animation: 
    typing 5s steps(68),
    cursor .4s step-end infinite alternate;
}

@keyframes cursor {
  50% {
    border-color: yellow;
  }
}

@keyframes typing {
  from {
    width: 0;
  }
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  width: 100px;
  height: 100px;
}

nav ul {
  display: flex;
}

nav ul li {
  list-style: none;
  margin: 10px 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  position: relative;
  transition: font-size 0.5s ease, transform 0.5s ease; 
}

nav ul li a::after {
  content: '';
  width: 0;
  height: 3px;
  background: #ffcc00;
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: width 0.5s ease; 
}

nav ul li a:hover {
  font-size: 24px; 
  transform: scale(1.2); 
}

nav ul li a:hover::after {
  width: 100%;
}

.header-text h1 {
  margin-top: 20%;
  font-size: 50px;
}

.header-text h1 span {
  color: #ffcc00;
}

.bi-linkedin, .bi-github {
  color: white;
  position: absolute;
  left: 80px;
  font-size: 30px; 
  margin-right: 10px;
}

.bi-linkedin {
  top: 390px;
}

.bi-github {
  top: 460px;
}

/* --- About Me --- */
#about {
  padding: 80px 0;
  color: white;
}

.contain {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-col-1 {
  flex-basis: 40%;
}

.about-col-1 .sub-title {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #ffcc00;
}

.about-col-1 p {
  font-size: 1.2em;
  line-height: 1.6;
}

.about-col-1 p::first-letter {
  font-size: 2em;
  color: #ffcc00;
  float: left;
  margin-right: 8px;
}

.tab-titles {
  display: flex;
  margin: 20px 0 50px;
}

.tab-links {
  margin-right: 50px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  padding: 10px;
  font-size: 1rem; 
  color: whitesmoke;
}

.tab-links::after {
  content: '';
  width: 0;
  height: 3px;
  background: #ffcc00;
  position: absolute;
  left: 0;
  bottom: -8px;
  transition: width 0.5s ease;
}

.tab-links.active-link {
  font-weight: bold;
  color: #ffcc00;
}

.tab-links.active-link::after {
  width: 100%;
}

/* Additional styling for smooth transitions */
.tab-contents {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding-top: 0;
  opacity: 0;
  transform: translateY(10px); /* Start with a slight downward shift */
  transition: opacity 0.5s ease, transform 0.5s ease; /* Add transition effects */
}

.tab-contents ul li{
  list-style: none;
  margin: 12px 0;
}

.tab-contents ul li span{
  color: #ffcc00;
  font-size: 18px;
}

.tab-contents.active-tab {
  display: block;
  position: relative;
  opacity: 1;
  transform: translateY(0); /* Move back to original position */
}

/*-------------- services ---------------------- */

#services{
  padding: 30px 0;
}

.services-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.services-list div{
  background: rgb(37, 37, 37);
  padding: 40px;
  font-size: 18px;
  font-weight:lighter;
  border-radius: 30px;
  /* transition: background 0.5s, transform 0.5s; */
}

.services-list div i{
  font-size: 50px;
  margin-bottom: 30px;
}

.services-list div h2{
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 15px;
}

.services-list div a{
  text-decoration: none;
  color: #ffff;
  font-size: 15px;
  margin-top: 20px;
  display: inline-block;
}

/* // To make it change colour
.services-list div:hover{
  background: #F6A600;
  transform: translateY(-10px);
  color: black;
  font-weight: bolder;
} */

/*-------------- my work ---------------------- */

#portfolio {
  padding: 50px 0;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 20px;
}

.work {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.work img {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  display: block;
  transition: transform 0.8s;
}

/* Ensure the layer is visible and positioned correctly */
.layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  opacity: 0; /* Start with 0 opacity (hidden) */
  transition: opacity 0.5s ease; /* Smooth transition for opacity */
  z-index: 1;
}

/* Show the layer with a smooth fade-in effect on hover */
.work:hover .layer {
  opacity: 1; /* Full opacity when hovered */
}

/* Style for the link icon */
.layer a {
  color: white;
  font-size: 24px;
  text-decoration: none;
  padding: 10px;
  transition: transform 0.3s ease; /* Smooth scaling transition */
}

/* Optionally, add a slight scale effect to the link icon */
.work:hover .layer a {
  transform: scale(1.1); /* Slightly increase the size of the icon on hover */
}

.btn{
  display: block;
  margin: 50px auto;
  width: fit-content;
  border: 1px solid #ffcc00;
  padding: 14px 50px;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  transition: background 0.5s;
}

.btn:hover{
  background: #ffcc00;
}

/* ------------ contact ------------ */

#contact {
  background-color: black;
  padding: 60px 0;
}

.contact-left,
.contact-right {
  flex: 1;
  padding: 20px;
}

.contact-left {
  flex-basis: 35%;
}

.contact-left h1 {
  font-size: 2rem;
  color: white;
  margin-bottom: 20px;
}

.contact-left p {
  font-size: 1rem;
  color: white;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.contact-left p i {
  margin-right: 10px;
  color: white;
}

.contact-right {
  flex-basis: 60%;
}

.contact-right form {
  display: flex;
  flex-direction: column;
}

.contact-right form input,
.contact-right form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  color: #333;
}

.contact-right form input:focus,
.contact-right form textarea:focus {
  outline: none;
  border-color: #ffcc00;
}

.contact-right form button {
  padding: 15px 25px;
  background-color: #ffcc00;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-right form button:hover {
  background-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-left,
  .contact-right {
      flex-basis: 100%;
  }
}