* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Space Mono", monospace;
}

html {
  font-size: 90%;
  scroll-behavior: smooth;
}

@media (min-resolution: 1.25dppx) {
  html {
    font-size: 70%;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 55%;
  }
}

body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: black;
  color: white;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5%;
  background-color: black;
  z-index: 1000;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 995px) {
  header {
    padding: 1rem 4%;
  }
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #b74b4b;
  cursor: pointer;
  transition: 0.5s ease;
}

.logo:hover {
  transform: scale(1.1);
}

nav a {
  font-size: 1.3rem;
  font-weight: 500;
  margin-left: 2rem;
  color: white;
  transition: 0.3s ease;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  color: #b74b4b;
  border-bottom: 3px solid #b74b4b;
}

#home .home-content,
#home .home-img {
  position: relative;
  z-index: 2;
}

/* Hamburger */
#hamburger-menu {
  display: none;
  font-size: 1.3rem;
  color: #b74b4b;
  cursor: pointer;
}

#hamburger-menu i {
  transition: transform 0.3s ease;
}

#hamburger-menu.active i {
  transform: rotate(90deg);
}

#hamburger-menu.active .fa-bars::before {
  content: "\f00d";
}

@media (max-width: 995px) {
  nav {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    width: 100%;
    border-bottom: 3px solid #b74b4b;
    border-top: 3px solid #b74b4b;
    padding: 1.5rem;
    background-color: #161616;
    z-index: 999;
  }

  #hamburger-menu {
    display: block;
    font-size: 2rem;
    cursor: pointer;
  }

  nav.active {
    display: block;
  }

  nav a {
    display: block;
    font-size: 1.5rem;
    margin-left: 1.2rem;
    margin-bottom: 1rem;
  }

  nav a:hover,
  nav a.active {
    padding: 0.5rem;
    border-radius: 0.2rem;
    border-bottom: 0.5 rem solid #b74b4b;
  }
}

section {
  min-height: 100vh;
  padding: 5rem 9% 5rem;
  scroll-margin-top: 70px;
}

.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8rem;
  background-color: black;
}

.home .home-content h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.3;
}

span {
  color: #b74b4b;
}

.home-content h3 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.home-content p {
  font-size: 1.6rem;
}

.home-img {
  border-radius: 50%;
}

.home-img img {
  position: relative;
  width: 25vw;
  max-width: 400px;
  min-width: 250px;
  border-radius: 50%;
  box-shadow: 0 0 25px #b74b4b;
  cursor: pointer;
  transition: 0.3s ease;
}

.home-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px #b74b4b;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background-color: transparent;
  border: 0.2rem solid #b74b4b;
  font-size: 2rem;
  border-radius: 50%;
  margin: 3rem 0.75rem;
  transition: 0.3s ease;
  color: #b74b4b;
}

.social-icons a:hover {
  color: black;
  background-color: #b74b4b;
  transform: scale(1.3) translateY(-5px);
  box-shadow: 0 0 25px #b74b4b;
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background-color: black;
  border-radius: 4rem;
  font-size: 1.6rem;
  color: #b74b4b;
  letter-spacing: 0.3rem;
  font-weight: 600;
  border: 2px solid #b74b4b;
  transition: 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  background-color: #b74b4b;
  color: black;
  box-shadow: 0 0 25px #b74b4b;
  transform: scale3d(1.03);
}

.typewrite > .wrap {
  border-right: 0.08em solid #fff;
}

/* Home Section */
section {
  min-height: 100vh;
  padding: 5rem 9% 5rem;
  scroll-margin-top: 70px;
}

.home {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8rem;
  background-color: black;
}

.home .home-content h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.3;
}

span {
  color: #b74b4b;
}

.home-content h3 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.home-content p {
  font-size: 1.6rem;
}

.home-img {
  border-radius: 50%;
}

.home-img img {
  position: relative;
  width: 25vw;
  max-width: 400px;
  min-width: 200px;
  border-radius: 50%;
  box-shadow: 0 0 25px #b74b4b;
  cursor: pointer;
  transition: 0.3s ease;
}

.home-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px #b74b4b;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background-color: transparent;
  border: 0.2rem solid #b74b4b;
  font-size: 2rem;
  border-radius: 50%;
  margin: 3rem 0.75rem;
  transition: 0.3s ease;
  color: #b74b4b;
}

.social-icons a:hover {
  color: black;
  background-color: #b74b4b;
  transform: scale(1.3) translateY(-5px);
  box-shadow: 0 0 25px #b74b4b;
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background-color: black;
  border-radius: 4rem;
  font-size: 1.6rem;
  color: #b74b4b;
  letter-spacing: 0.3rem;
  font-weight: 600;
  border: 2px solid #b74b4b;
  transition: 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  background-color: #b74b4b;
  color: black;
  box-shadow: 0 0 25px #b74b4b;
  transform: scale3d(1.03);
}

@media (max-width: 1200px) {
  .home {
    gap: 5rem;
  }
  .home .home-content h1 {
    font-size: 3.5rem;
  }
  .home-content h3 {
    font-size: 2.2rem;
  }
}

@media (max-width: 992px) {
  .home {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
    margin-top: 5rem;
    margin-bottom: 5rem;
  }

  .home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home .home-content h1 {
    font-size: 3.2rem;
  }

  .home-content h3 {
    font-size: 2rem;
  }

  .home-content p {
    font-size: 1.5rem;
  }

  .home-img img {
    width: 45vw;
    max-width: 280px;
  }

  .social-icons {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 5rem 4% 5rem;
  }

  .home .home-content h1 {
    font-size: 2.8rem;
  }

  .home-content h3 {
    font-size: 1.8rem;
  }

  .home-img img {
    width: 10vw;
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .home .home-content h1 {
    font-size: 2.5rem;
  }
  .home-content h3 {
    font-size: 1.6rem;
  }
  .home-content p {
    font-size: 1.4rem;
  }
  .social-icons a {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.8rem;
  }
}

/* Section Headings */
.heading {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 3rem;
  font-weight: 700;
}

.heading span {
  color: #b74b4b;
}

/* === Skills Section === */
.subheading {
  text-align: center;
  font-size: 2rem;
  margin: 4rem 0 2rem;
  color: #fff;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Projects Grid Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Contact Section */
#contact p {
  font-size: 1.6rem;
  text-align: center;
  margin: 1rem 0;
}

#contact a {
  color: #b74b4b;
  transition: color 0.3s ease;
}

#contact a:hover {
  color: white;
}

/* About Section */
#about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.about-img img {
  width: 370px;
  border-radius: 1rem;
  border: 3px solid #b74b4b;
  box-shadow: 0 0 20px rgba(183, 75, 75, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #b74b4b;
}

.about-content {
  max-width: 600px;
}

.about-content p {
  font-size: 1.6rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-info {
  list-style: none;
  margin-bottom: 2rem;
}

.about-info li {
  font-size: 1.5rem;
  margin: 0.8rem 0;
}

.about-info strong {
  color: #b74b4b;
  margin-right: 0.5rem;
}

#about .btn {
  display: inline-block;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-img img {
    width: 250px;
  }
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.skill-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #161616;
  border: 2px solid #b74b4b;
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  box-shadow: 0 0 10px rgba(183, 75, 75, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #b74b4b;
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.skill-info i {
  font-size: 2rem;
  color: #b74b4b;
}

/* Progress Bar */
.progress-bar {
  flex: 1;
  height: 1.2rem;
  background-color: #2a2a2a;
  border-radius: 1rem;
  margin-left: 1rem;
  overflow: hidden;
  border: 1px solid #b74b4b;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #b74b4b, #ff5e5e);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  padding-right: 0.5rem;
  line-height: 1.2rem;
  border-radius: 1rem;
  transition: width 1.5s ease;
}

[data-aos] .progress {
  width: 0;
}

[data-aos].aos-animate .progress {
  width: inherit;
  transition: width 1.5s ease-in-out;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .center-skill {
    width: 100%;
  }
}

/* Education Timeline */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background: #b74b4b;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  padding: 1.2rem 2rem;
  position: relative;
  width: 50%;
}

.timeline-item .content {
  background: #161616;
  border: 2px solid #b74b4b;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(183, 75, 75, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item .content:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #b74b4b;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

/* Timeline Dots */
.timeline-item::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: #b74b4b;
  border: 1px solid #fff;
  border-radius: 50%;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
}

.timeline-item.left::before {
  right: 9px;
}

.timeline-item.right::before {
  left: 9px;
}

@media (max-width: 992px) {
  .timeline-item.left::before {
    right: 7px;
  }

  .timeline-item.right::before {
    left: 7px;
  }
}

@media (max-width: 768px) {
  .timeline-content {
    padding: 10px 15px;
  }

  .timeline-content h2 {
    font-size: 1.6rem;
  }

  .timeline-content h3 {
    font-size: 1.4rem;
  }

  .timeline-content p {
    font-size: 1.2rem;
  }

  .left::before {
    right: 15px;
  }
  .right::before {
    left: 15px;
  }

  .right::after {
    left: -14px;
  }

  .timeline-item.left::before {
    right: 5px;
  }

  .timeline-item.right::before {
    left: 5px;
  }
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background-color: #161616;
  border: 2px solid #b74b4b;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(183, 75, 75, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-bottom: 2px solid #b74b4b;
}

.project-info {
  padding: 1.5rem;
  text-align: center;
}

.project-info h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #b74b4b;
  margin-bottom: 0.8rem;
}

.project-info p {
  font-size: 1.4rem;
  color: #ccc;
}

.project-info .btn {
  letter-spacing: 0;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 20px #b74b4b;
}

@media (max-width: 768px) {
  .project-info h3 {
    font-size: 1.6rem;
  }
  .project-info p {
    font-size: 1.3rem;
  }
  .project-card img {
    height: 230px;
  }
}

.project-info .btn {
  margin-top: 1rem;
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-size: 1.4rem;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-info p {
  font-size: 1.5rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.contact-info i {
  color: #b74b4b;
  font-size: 1.8rem;
}

.contact-info a {
  color: #fff;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #b74b4b;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.5rem;
  background: #111;
  border: 2px solid #b74b4b;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  color: white;
  outline: none;
  transition: border 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #ff5e5e;
}

.contact-form button {
  align-self: flex-start;
}

/* Preloader background */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

.loader {
  width: 45px;
  aspect-ratio: 0.75;
  --c: no-repeat linear-gradient(#b74b4b 0 0);
  background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
  animation: l7 1s infinite linear alternate;
}
@keyframes l7 {
  0% {
    background-size: 20% 50%, 20% 50%, 20% 50%;
  }
  20% {
    background-size: 20% 20%, 20% 50%, 20% 50%;
  }
  40% {
    background-size: 20% 100%, 20% 20%, 20% 50%;
  }
  60% {
    background-size: 20% 50%, 20% 100%, 20% 20%;
  }
  80% {
    background-size: 20% 50%, 20% 50%, 20% 100%;
  }
  100% {
    background-size: 20% 50%, 20% 50%, 20% 50%;
  }
}
