/* Font */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap");

/* Root Variables */
:root {
  /*===== Font weight =====*/
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*===== Colors =====*/
  /* --pri-color: #cc4b2c;
  --pri-color-dark: #662616;
  --pri-color-darken: #290f09;
  --title-color: #cc4b2c;
  --text-color: #54423d;
  --input-color: #e6e6e6;
  --pri-color-light: #eae7e6;
  --body-color: #fcecf0; */

  --pri-color: #DE3B49;
  --pri-color-dark: #c11736;
  --pri-color-darken: #690d1d;
  --title-color: #e9536e;
  --text-color: #5B5757;
  --text-color-dark: #292929;
  --input-color: #f8d9de;
  --pri-color-light: #eae7e6;
  --body-color: #fdf4f5;
  --body-color: #fcecf0;



  /*===== Font and typography =====*/
  --font: "Montserrat", sans-serif;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.813rem;

  /* Misc. */
  --border-rad: 0.5rem;
  --shift: 25rem;
  --nav-height: 3rem;
}

body.darkTheme {
  --pri-color: hsl(250, 57%, 53%);
  --pri-color-dark: hsl(250, 29%, 16%);
  --pri-color-darken: hsl(249, 53%, 17%);
  --title-color: hsl(250, 8%, 95%);
  /* --title-color: hsl(250, 69%, 61%); */
  --text-color-dark: hsl(245, 7%, 68%);
  --text-color: hsl(250, 8%, 75%);
  --input-color: hsl(250, 29%, 16%);
  --pri-color-light: #eae7e6;
  --body-color: hsl(250, 28%, 12%);
}

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition-duration: 0.3s;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Reusable Classes */
.title {
  position: relative;
  font-size: var(--h1-font-size);
  color: var(--title-color);
  text-align: center;
  margin: 0 auto;
  width: max-content;
}

section > .title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -35%;
  background-color: var(--pri-color-dark);
  height: 2px;
  width: 70%;
}

.subtitle {
  display: block;
  font-size: var(--small-font-size);
  color: var(--text-color-darken);
  text-align: center;
  font-weight: var(--font-bold);
}

.button {
  background-color: var(--pri-color);
  padding: 1rem 2rem;
  border-radius: var(--border-rad);
  color: var(--pri-color-light);
  margin: 1rem 0;
  font-weight: var(--font-semi-bold);
}

.button:hover {
  background-color: var(--pri-color-dark);
}

.socialLink {
  margin: 0.8rem 0.2rem;
  font-size: 1.2rem;
  /* color: var(--pri-color-dark); */
  background-color: var(--pri-color);
  color: var(--pri-color-light);
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
}

.socialLink:hover {
  background-color: var(--pri-color-dark);
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem 1rem 0 1rem;
}

.section {
  padding-top: calc(var(--nav-height) + 1rem);
}

/* Navigation Section */

.show {
  transform: translateX(0) !important;
}

#nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  height: var(--nav-height);
  width: 100%;
  background-color: var(--body-color);
  z-index: 10;
  padding: 0 1.5rem;
}

.navShadow {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#navToggle {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11;
}

.menuBtn {
  position: absolute;
  font-size: var(--h2-font-size);
  transition: 0.3s;
}

.fade {
  transform: scale(0);
}

.notFade {
  transform: scale(1);
}

.shift {
  padding-left: var(--shift);
}

#nav .logo {
  margin-left: auto;
  font-size: var(--h3-font-size);
}

/* Theme Button */

#theme {
  margin-left: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme > * {
  position: absolute;
  transition-duration: 0.3s;
}

#themebtn {
  opacity: 0;
  z-index: 3;
  transform: scale(1.6);
}

#theme #day {
  transform: scale(0);
}

#themebtn:checked ~ #day {
  transform: scale(1);
}
#themebtn:checked ~ #night {
  transform: scale(0);
}

#navMenu {
  width: var(--shift);
  background-color: var(--pri-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: inherit;
  min-height: 100vh;
  transition-duration: 0.5s;
  transform: translateX(-25rem);
  border-top-right-radius: var(--border-rad);
  border-bottom-right-radius: var(--border-rad);
}

#navMenu > .navLinks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: inherit;
  margin: 0 2rem;
}

#navMenu > .navLinks > .navLink {
  margin: 0.5rem 0;
}

#navMenu > .navLinks > .navLink a {
  font-weight: var(--font-bold);
  color: var(--pri-color-light);
}

#navMenu > .navLinks > .navLink a:hover,
.active {
  color: var(--text-color-dark) !important;
}

/* Home Section */

#main {
  transition-duration: 0.5s;
}

#home > .container {
  min-height: calc(100vh - var(--nav-height));
  padding-top: calc(1rem + var(--nav-height));
}

#home .imgContainer {
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--pri-color);
  margin: 0.8rem 0 0.5rem 0;
}

#home .imgContainer img {
  width: 250px;
  padding: 1rem 0 0 1rem;
}

#home .title {
  font-weight: var(--font-semi-bold);
}

/* About Section */

#about > .container {
  gap: 3rem;
}

#about .aboutContainer {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
}

#about .aboutImg {
  background-color: var(--pri-color-dark);
  position: relative;
  border-radius: var(--border-rad);
  box-shadow: 4px 10px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  width: 20rem;
  min-width: 16rem;
  max-width: 30rem;
}

#about .aboutImg .imgStripe {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  background-color: var(--pri-color);
  color: var(--pri-color-light);
}

#about .aboutImg .imgStripe .bx {
  color: var(--pri-color-dark);
  background-color: var(--pri-color-light);
  border-radius: 50%;
  font-size: 1.3rem;
  padding: 0.3rem;
  margin: 0.2rem 0.4rem;
}

#about .aboutData {
  text-align: justify;
  flex-basis: 50%;
  min-width: 20rem;
}

#about .aboutData > p {
  margin-top: 1rem;
}

/* Education Section */

#about .education .title {
  font-size: var(--h2-font-size);
  /* color: var(--text-color); */
  margin-bottom: 1rem;
}

.educationContent {
  display: grid;
  grid-template-columns: 1fr max-content 1fr;
  margin-bottom: 1.2rem;
}

.eductionYear,
.educationRace {
  font-size: var(--h3-font-size);
  margin-bottom: 0.25rem;
  max-width: 20rem;
}

.educationUniversity,
.educationSpecialty {
  display: block;
  font-size: var(--smaller-font-size);
}

.educationYear,
.educationUniversity {
  text-align: right;
}

.educationTime {
  margin: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.educationRounder {
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid var(--pri-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.educationRounder::after {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  background-color: var(--pri-color);
  border-radius: 50%;
}

.educationLine {
  display: block;
  height: 3rem;
  width: 2px;
  background-color: var(--pri-color);
}

/* Skills Section */

#skills .container {
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2rem;
}

/* #skills .container >* {
  flex-grow: 1;
} */

#skills .skillsWrapper {
  display: flex;
  flex-wrap: wrap;
  padding: 3rem 2rem;
  border-radius: var(--border-rad);
  background-color: var(--pri-color-darken);
  font-weight: var(--font-semi-bold);
  color: var(--pri-color-light);
  gap: 2rem;
  width: 80%;
}

.skillsWrapper > * {
  flex-grow: 1;
  flex-basis: 48%;
  max-width: 100%;
  min-width: 10rem;
}

#skills .skillsIntro {
  text-align: justify;
}

.skillsIntro h3 {
  margin-bottom: 1rem;
  color: var(--pri-color);
  font-size: var(--h1-font-size);
}

.skillsIntro .fun {
  margin-top: .3rem;
  font-size: var(--smaller-font-size);
}

#skills .skillsBars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skillsBars .skillBar .skillBarName {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skillBar .bar {
  position: relative;
  height: 0.7rem;
  background-color: var(--pri-color);
}

.barBank {
  width: 75%;
}

.barFamily {
  width: 90%;
}

.barCorp {
  width: 85%;
}

.barEstate {
  width: 70%;
}

#skills .skillsCircles {
  flex-grow: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.skillsCircles > .skillCircle > p {
  text-align: center;
  font-size: 1.2rem;
  font-weight: var(--font-semi-bold);
}

.progress-circle {
  font-size: var(--h1-font-size);
  margin: 1.5rem 2.2rem;
  position: relative; /* so that children can be absolutely positioned */
  padding: 0;
  width: 5em;
  height: 5em;
  /* background-color: #F2E9E1;  */
  background-color: rgba(148, 148, 148, 0.308);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-circle:after {
  border: none;
  position: absolute;
  border-radius: 50%;
  width: 85%;
  height: 85%;
  background-color: var(--body-color);
  content: "";
}
/* Text inside the control */
.progress-circle span {
  position: absolute;

  z-index: 2;
}
.left-half-clipper {
  /* a round circle */
  border-radius: 50%;
  width: 5em;
  height: 5em;
  position: absolute; /* needed for clipping */
  clip: rect(0, 5em, 5em, 2.5em); /* clips the whole left half*/
}
/* when p>50, don't clip left half*/
.progress-circle.over50 .left-half-clipper {
  clip: rect(auto, auto, auto, auto);
}
.value-bar {
  position: absolute;
  clip: rect(0, 2.5em, 5em, 0);
  width: 5em;
  height: 5em;
  border-radius: 50%;
  border: 0.45em solid var(--pri-color-dark);
  box-sizing: border-box;
}
.progress-circle.over50 .first50-bar {
  position: absolute;
  clip: rect(0, 5em, 5em, 2.5em);
  background-color: var(--pri-color-dark);
  border-radius: 50%;
  width: 5em;
  height: 5em;
}
.progress-circle:not(.over50) .first50-bar {
  display: none;
}

.progress-circle.p90 .value-bar {
  transform: rotate(324deg);
}
.progress-circle.p50 .value-bar {
  transform: rotate(180deg);
}
.progress-circle.p76 .value-bar {
  transform: rotate(274deg);
}
.progress-circle.p80 .value-bar {
  transform: rotate(288deg);
}

/* Services Section */

#services .container {
  gap: 2rem;
}

#services .services {
  width: 80%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2rem;
}

.services .service {
  border-radius: var(--border-rad);
  text-align: center;
  padding: .8rem;
  box-shadow: 4px 10px 20px rgba(0, 0, 0, 0.2);
  margin: 0.8rem;
  width: 20rem;
}

.services .service:hover {
  transform: scale(1.03);
  box-shadow: 2px 10px 30px rgba(0, 0, 0, 0.2);
  background-color: var(--pri-color);
  color: white;
}

.service img {
  border-radius: var(--border-rad);
}

.service .serviceTitle {
  margin-top: 1rem;
}

#services .appointments {
  margin: 1rem 0;
  display: flex;
  width: 90%;
  font-size: var(--h2-font-size);
  flex-wrap: wrap;
  justify-content: space-evenly;
  background-color: var(--pri-color-dark);
  color: var(--text-color-dark);
  border-radius: var(--border-rad);
}

.appointment {
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.appointment:nth-child(2) {
  flex-basis: 40%;
}

.appointment .bx {
  font-size: 3.5rem;
  margin-right: 0.5rem;
}

.appointment .appointmentSubtitle {
  font-size: calc(var(--h1-font-size) - 0.2rem);
  color: var(--pri-color-light);
}

/* Contact Section */

#contact > .container {
  justify-content: center;
  flex-flow: row wrap-reverse;
  align-items: initial;
  gap: 2rem;
}

#contactForm {
  display: flex;
  flex-direction: column;
  width: 25rem;
}

#contactForm .contactInput {
  background-color: var(--input-color);
  border: none;
  border-radius: var(--border-rad);
  outline: none;
  padding: 1rem;
  margin: 0.5rem 0;
  font-size: var(--normal-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--text-color);
}

#contactForm textarea.contactInput {
  resize: vertical;
  margin-top: 0.5rem;
  min-height: 4rem;
}

#contactForm .button {
  border: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
}


#contact .container address .bx {
  color: var(--pri-color);
  /* color: var(--text-color-dark); */
}

#contact .contactMisc {
  font-size: var(--small-font-size);
}

#submitSucess {
  display: none;
  color: #27ae60;
}

#submitError {
  display: none;
  color: #cf000f;
}

.contact__info {
  margin-bottom: 1.5rem;
}

.contact__subtitle {
  font-size: var(--h3-font-size);
  color: var(--text-color-dark);
  margin-bottom: 0.5rem;
}

.contact__text {
  display: block;
  padding-left: 1rem;
}

.alertShow {
  display: block !important;
}

/* Footer */

#footer {
  margin-top: 2rem;
  background-color: var(--pri-color-darken);
  border-top-left-radius: var(--border-rad);
  border-top-right-radius: var(--border-rad);
  text-align: center;
  transition-duration: 0.5s;
}

#footer > .container {
  padding: 0.5rem;
}

#footer .info {
  color: var(--pri-color-light);
}

#footer .stripe {
  border-top: 1px solid black;
  background-color: #151515;
  font-size: var(--medium-font-size);
  width: 100%;
  text-align: center;
  color: var(--pri-color-light);
}

/* Misc. Stuffs */

/* Scroll to top */
#scrollTop {
  background-color: var(--pri-color);
  padding: 0.5rem;
  position: fixed;
  right: 1rem;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--pri-color-light);
}

#scrollTop:hover {
  background-color: var(--pri-color-dark);
}

/* Custom Scroll-bar */

/* For transparent background of scroll-bar */
body {
  overflow: overlay;
}

/* width */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

/* Handle */
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-corner {
  background: rgb(68, 68, 68);
  border-radius: 0.1rem;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Custom Selection-color */

::-moz-selection {
  color: var(--body-color);
  background-color: rgba(75, 75, 75, 0.493);
}

::selection {
  color: var(--body-color);
  background-color: rgba(80, 80, 80, 0.8);
}

/* Mobile CSS */

@media screen and (max-width: 768px) {
  /* Decreasing font size on small displays  */
  :root {
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;
    --shift: 70vw;
  }

  /* Preventing shift of main body due to navbar */
  #main,
  #footer {
    padding-left: 0;
  }

  #navMenu {
    transform: translateX(-70vw);
  }

  #skills .skillsWrapper {
    width: 100%;
  }

  /* Contact Section */
  #contactForm,
  #contact .container address {
    max-width: 30rem;
    width: 90%;
  }
}

@media screen and (max-width: 500px) {
  #about .aboutData,
  #about .aboutImg {
    flex-basis: 90%;
    min-width: auto;
  }
}
