@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
  list-style: none;
  text-decoration: none;
}

:root {
  --color-Light: #888888;
  --color-secondary: #3e3e3e;
  --color-medium: #ffffff;
}

.nav-bar {
  margin: 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav-bar .home-link {
  font-size: 4vw;
  font-weight: bold;
  color: var(--color-Light);
  letter-spacing: 2px;
  text-align: center;
}

.nav-bar .nav-menu {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.nav-menu .nav-items a {
  padding: 10px;
  font-size: 17px;
  font-weight: 250;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.home-hero {
  width: min(1200px, 92vw);
  margin: 2rem auto 0;
  display: flex;
  justify-content: center;
}

.hero-image-frame {
  width: 100%;
  max-width: 980px;
  overflow: hidden;
  background: linear-gradient(135deg, #f6f6f6 0%, #ffffff 100%);
  /* box-shadow: 0 24px 50px rgba(62, 62, 62, 0.12); */
}

.hero-image-frame.owl-carousel .owl-stage-outer,
.hero-image-frame.owl-carousel .owl-stage,
.hero-image-frame.owl-carousel .owl-item,
.hero-slide {
  height: min(72vh, 760px);
}

.hero-image-frame img {
  width: 100%;
  height: min(72vh, 760px);
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero-image-frame.owl-carousel .owl-item img {
  height: 100%;
}

.hero-slide {
  position: relative;
  overflow: hidden;
}

.hero-image-frame.owl-carousel .owl-item {
  will-change: transform;
}

.footer {
  margin: 5rem 0 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer .social-box {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  color: var(--color-Light);
}

.footer .social-box span {
  /* height: 30px; */
  /* width: 30px; */
  /* border-radius: 50%; */
  /* background-color: var(--color-Light); */
  color: var(--color-Light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: ease-in-out 0.3s;
}

.footer .social-box span:hover {
  color: var(--color-secondary);
}

.footer .foot-note {
  font-size: 16px;
  font-weight: 260;
  color: var(--color-secondary);
  padding: 2px;
  text-align: center;
}

.footer-break {
  display: inline;
  margin-left: 0.3rem;
}

/* Floating appointment button */
.float-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  background: #3b3939;
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(29, 32, 30, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}
.float-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.45);
  color: #fff;
}

/* Projects page */
#project {
  border: 2px solid var(--color-Light);
}

.portfolio-cards {
  position: relative;
  margin: auto;
  max-width: 80%; /* Increased for 3 columns */
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Three per row on larger screens */
  gap: 20px;
}

.portfolio-cards img {
  max-width: 100%;
  display: block;
}

.experience-page {
  width: min(960px, 92vw);
  margin: 0 auto;
}

.experience-intro {
  margin-bottom: 2.5rem;
}

.experience-intro p {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--color-secondary);
  line-height: 1.7;
}

.timeline {
  position: relative;
  display: grid;
  gap: 2rem;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(136, 136, 136, 0.2),
    rgba(136, 136, 136, 0.9),
    rgba(136, 136, 136, 0.2)
  );
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -2.6rem;
  top: 1.25rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background-color: var(--color-medium);
  border: 3px solid var(--color-Light);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.9);
}

.timeline-card {
  padding: 1.6rem 1.75rem;
  border: 1px solid rgba(136, 136, 136, 0.25);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  box-shadow: 0 16px 32px rgba(62, 62, 62, 0.08);
}

.timeline-date {
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--color-Light);
}

.timeline-card h2 {
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--color-secondary);
}

.timeline-card h3 {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-Light);
}

.timeline-card p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-secondary);
}

.timeline-card p + p {
  margin-top: 0.85rem;
}

/* About page */
#about {
  border: 2px solid var(--color-Light);
}

.middle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: auto;
  margin-top: 2rem;
}

.middle-content .profile-img {
  width: 55%;
  position: relative;
  margin: auto;
}

.profile-img img {
  max-width: 100%;
  display: block;
  border-radius: 100%;
}

.middle-content .about-info {
  margin-top: 3rem;
  width: 89%;
}

.middle-content .about-info p {
  /* text-align: center;
  justify-content: center; */
  text-align: justify;
  text-justify: inter-word;
  font-size: 20px;
  font-weight: 300;
  padding: 0 1rem;
}

.middle-content .about-info p b {
  margin-left: 36%;
}

/* .middle-content .about-info p:last-child {
  text-align: center;
  font-weight: 500;
  font-size: 20px;
} */

.middle-content .about-info p:nth-child(2),
.middle-content .about-info p:nth-child(3) {
  margin-top: 0.9rem;
}

.middle-content .service-info {
  margin-top: 3rem;
  width: 100%;
  max-width: 1200px;
}

.middle-content .service-info h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  padding: 0 1rem;
  margin-bottom: 2rem;
}

.middle-content .service-info p {
  font-size: 20px;
  font-weight: 300;
  text-align: center;
  padding: 0.8rem 2rem;
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
}

.service-grid {
  width: min(1100px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  min-height: 210px;
  padding: 1.75rem;
  border: 1px solid rgba(136, 136, 136, 0.22);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  box-shadow: 0 16px 32px rgba(62, 62, 62, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px rgba(62, 62, 62, 0.12);
}

.service-card h3 {
  margin-bottom: 0.85rem;
  font-size: 1.4rem;
  font-weight: 500;
  text-align: center;
  color: var(--color-secondary);
}

.middle-content .service-card p {
  margin: 0;
  padding: 0;
  max-width: none;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-secondary);
}

/* Contacts page */
#contacts {
  border: 2px solid var(--color-Light);
}

.details-form form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  position: relative;
  margin: auto;
}

.details-form form input {
  padding: 1rem;
  width: 20rem;
  font-size: 16px;
  color: var(--color-Light);
  border: 2px solid var(--color-Light);
  outline: none;
  text-transform: capitalize;
}

.details-form form input[type="submit"] {
  font-size: 1.3rem;
  background-color: var(--color-Light);
  color: var(--color-medium);
  text-transform: uppercase;
  font-weight: 400;
  cursor: pointer;
}

/* Media queries for responsiveness */
@media (min-width: 1400px) {
  .profile-img img {
    max-width: 25%;
    margin: auto;
  }

  .middle-content .about-info p {
    /* text-align: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300; */
    padding: 0 30rem;
  }

  .middle-content .service-info li {
    padding: 0.5rem 15rem;
  }

  .portfolio-cards {
    max-width: 80%; /* Increased for 3 columns */
  }
}

@media (max-width: 1399px) and (min-width: 992px) {
  .portfolio-cards {
    grid-template-columns: repeat(2, 1fr); /* Two per row */
    max-width: 70%;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .portfolio-cards {
    grid-template-columns: repeat(2, 1fr); /* Two per row */
    max-width: 80%;
  }
}

@media (max-width: 767px) and (min-width: 480px) {
  .portfolio-cards {
    grid-template-columns: repeat(1, 1fr); /* One per row */
    max-width: 85%;
  }
}

@media (max-width: 992px) {
  .profile-img img {
    max-width: 60%;
    margin: auto;
  }

  .portfolio-cards {
    grid-template-columns: 1fr; /* One per row on smaller screens */
  }

  .portfolio-cards img {
    padding: 0 1rem;
  }

  .nav-bar .home-link {
    font-size: 6vw;
  }

  .experience-page {
    width: min(92vw, 760px);
  }

  .service-grid {
    grid-template-columns: 1fr;
    width: min(92vw, 700px);
  }
}

@media (max-width: 768px) {
  .nav-bar .nav-menu {
    flex-direction: row; /* Keeps navigation items in a row */
    margin-top: 1rem;
  }

  .nav-menu .nav-items a {
    padding: 8px;
    font-size: 15px;
  }

  .footer {
    margin: 3rem 0 1rem 0;
  }

  .timeline {
    padding-left: 2.2rem;
  }

  .timeline::before {
    left: 0.58rem;
  }

  .timeline-marker {
    left: -2.16rem;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9);
  }

  .timeline-card {
    padding: 1.25rem;
  }

  .timeline-card h2 {
    font-size: 1.2rem;
  }

  .home-hero {
    margin-top: 1rem;
  }

  .hero-image-frame {
    border-radius: 0;
  }

  .hero-image-frame.owl-carousel .owl-stage-outer,
  .hero-image-frame.owl-carousel .owl-stage,
  .hero-image-frame.owl-carousel .owl-item,
  .hero-slide {
    height: min(58vh, 520px);
  }

  .hero-image-frame img {
    height: min(58vh, 520px);
  }

  .float-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 767px) {
  .footer .foot-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
  }

  .footer-break {
    display: block;
    width: 100%;
    text-align: center;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .nav-bar .home-link {
    font-size: 7vw;
  }

  .portfolio-cards {
    max-width: 90%;
    grid-template-columns: 1fr; /* One per row on very small screens */
    gap: 10px;
  }

  .middle-content .about-info p {
    font-size: 16px;
    padding: 0 1rem;
  }

  .middle-content .service-info p {
    font-size: 16px;
    padding: 0 1rem;
  }

  .service-card {
    min-height: auto;
    padding: 1.25rem;
  }

  .service-card h3 {
    font-size: 1.15rem;
  }

  .corousel-box {
    max-width: 90vw; /* Adjust for small screens */
  }

  .nav-bar .nav-menu {
    flex-direction: row; /* Keeps navigation in row on small screens */
  }

  .experience-intro p,
  .timeline-card p {
    font-size: 0.95rem;
  }

  .timeline-date {
    font-size: 0.82rem;
    letter-spacing: 0.08rem;
  }

  .hero-image-frame img {
    height: 46vh;
  }

  .hero-image-frame.owl-carousel .owl-stage-outer,
  .hero-image-frame.owl-carousel .owl-stage,
  .hero-image-frame.owl-carousel .owl-item,
  .hero-slide {
    height: 46vh;
  }
}

/* Animations */
@keyframes heroHorizontalInFromRight {
  0% {
    opacity: 0;
    transform: translate3d(12%, 0, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroHorizontalOutToLeft {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  100% {
    opacity: 0;
    transform: translate3d(-12%, 0, 0);
  }
}

@keyframes heroHorizontalInFromLeft {
  0% {
    opacity: 0;
    transform: translate3d(-12%, 0, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroHorizontalOutToRight {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  100% {
    opacity: 0;
    transform: translate3d(12%, 0, 0);
  }
}

.owl-item.hero-slide-in-right {
  animation: heroHorizontalInFromRight 0.9s ease both;
}

.owl-item.hero-slide-out-left {
  animation: heroHorizontalOutToLeft 0.9s ease both;
}

.owl-item.hero-slide-in-left {
  animation: heroHorizontalInFromLeft 0.9s ease both;
}

.owl-item.hero-slide-out-right {
  animation: heroHorizontalOutToRight 0.9s ease both;
}

/* Page transitions */
@keyframes page-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
::view-transition-old(root) {
  animation: page-out 0.35s ease-in-out forwards;
}
::view-transition-new(root) {
  animation: page-in 0.35s ease-in-out forwards;
}
