:root {
  --color-bg: #fff;
  --color-bg-offset: #fefefeef;
  --color-text: #2d2d34;
  --color-text-offset: #101010;
  --color-primary: #ff335f;
  --color-secondary: #b4d4ee;
  --color-secondary-offset: #e7ee7f;

  --font-primary: "Anek Odia", sans-serif;
  --font-secondary: "DM Serif Text", serif;
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0e141b;
    --color-bg-offset: #0d091cef;
    --color-text: #fff;
    --color-text-offset: #fafafa;
  }

  .greeting .greeting-text > p span:first-child {
    font-weight: 500 !important;
    letter-spacing: 1px;
  }

  .about-me .swapper-slider > input[type="range"] {
    height: 0.25rem !important;
  }

  .footer .section-text > span:first-child {
    letter-spacing: 1px;
  }
}

body {
  font-size: 16px;
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
}

.hidden {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

.container {
  width: 100%;
  padding: 1rem;
}

.section-title {
  color: var(--color-primary);
  font-size: 1.75rem;
  font-family: var(--font-secondary);
  letter-spacing: 2px;
}

.section-text {
  font-size: 1.125rem;
  margin-top: 0.6rem;
}

/* Design and Layout of Header section */
.header {
  padding: 1rem 0;
}

.header .header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header .header-brand {
  text-decoration: none;
  color: var(--color-text-offset);
  display: flex;
  align-items: center;
  cursor: pointer;
}

.header .brand-icon {
  display: inline-block;
  padding: 0.5rem;
  background-color: var(--color-secondary);
  border-radius: 50%;
  transform: rotateY(0);
  transition: all 0.8s ease-in-out;
}

.header .brand-icon > img {
  width: 2rem;
  height: 2rem;
}

.header .brand-name {
  position: relative;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-left: 0.5rem;
}

.header .brand-name::after {
  position: absolute;
  bottom: 0.25rem;
  right: -0.25rem;
  display: inline-block;
  content: "";
  width: 0.5rem;
  height: 0.25rem;
  background-color: var(--color-text-offset);
  border-radius: 50%;
  transition: all 0.9s ease-in;
}

.header .header-brand:hover .brand-icon {
  transform: rotateY(180deg);
  background-color: var(--color-secondary-offset);
}

.header .header-brand:hover .brand-name::after {
  width: 100%;
  right: 0;
  background-color: var(--color-text);
  opacity: 0.7;
}

.header .nav {
  width: 100%;
  padding: 1rem;
}

.header .nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0;
}

.header .nav-item {
  list-style: none;
  padding: 0 0.3rem;
}

.header .nav-link {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.0625rem;
  letter-spacing: 1px;
  display: block;
  border: 0;
}

.header .nav-link::first-letter {
  color: var(--color-primary);
}

.header .nav-link::after {
  z-index: -1;
  position: absolute;
  bottom: 0;
  right: 0;
  display: block;
  content: "";
  width: 0;
  height: 0.25rem;
  background-color: var(--color-primary);
  transition: width 0.3s ease-out;
}

.header .nav-link:hover::after {
  width: 100%;
}

/* Design and Layout of Greeting section */
.greeting {
  display: flex;
}

.greeting .greeting-text {
  align-self: center;
}

.greeting .greeting-text > p span:first-child {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.25em;
}

.greeting .greeting-text > p span:last-child {
  display: block;
  font-size: 2.25rem;
  font-family: var(--font-secondary);
  line-height: 1.25em;
  letter-spacing: 1px;
  color: var(--color-text-offset);
  margin-top: -0.5rem;
}

.greeting .greeting-text > p:last-child {
  margin-top: 0.625rem;
  font-size: 1.25rem;
}

.greeting .greeting-photo {
  display: none;
}

/* Design and Layout of About Me section */
.about-me > div {
  margin-top: 0.8rem;
}

.about-me .about-me-photo {
  width: 200px;
  height: 200px;
  padding: 0.25rem;
  margin: 0 auto;
  border: 3px dashed var(--color-text);
  border-radius: 50%;
  transform: rotateZ(0);
  transition: all 1s;
}

.about-me .about-me-photo > img {
  border-radius: 50%;
  transform: rotateZ(0);
  transition: all 1s;
}

.about-me .about-me-photo:hover {
  border: 3px solid var(--color-primary);
  transform: rotateZ(45deg);
}

.about-me .about-me-photo:hover > img {
  transform: rotateZ(-45deg);
}

.about-me .about-me-text {
  font-size: 1.125rem;
  margin-top: 2rem;
  height: auto;
}

.about-me .swapper-slider {
  display: block;
  margin: 0 auto 1rem;
  width: 9rem;
}

.about-me .swapper-slider > input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-text-offset);
  width: 100%;
  height: 0.375rem;
  border-radius: 0.1875rem;
}

.about-me .swapper-slider > input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--color-text-offset);
  border: 0;
  border-radius: 50%;
  outline: 0.2rem solid var(--color-bg);
  cursor: pointer;
}

.about-me .swapper-slider > input[type="range"]::-moz-range-thumb {
  appearance: none;
  width: 1rem;
  height: 1rem;
  background-color: var(--color-text-offset);
  border: 0;
  border-radius: 50%;
  outline: 0.2rem solid var(--color-bg);
  cursor: pointer;
}

.about-me .about-me-text > p {
  margin-bottom: 0.5rem;
  display: none;
}

/* Design and Layout of Portfolios section */
.portfolios .portfolios-list {
  margin-top: 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.portfolios .portfolio-item {
  list-style: none;
  flex: 33%;
  max-width: 33%;
  min-height: 170px;
  padding: 2px;
}

.portfolios .portfolio-item div {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0.3rem;
  border-radius: 8px;
  background-color: var(--color-secondary);
}

/* Design and Layout of Tools and Technologies section */
.skills .skills-list {
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.skills .skills-list > li {
  list-style: none;
  width: 6rem;
  padding: 0.5rem;
  text-align: center;
}

.skills .skills-list > li > svg,
.skills .skills-list > li > img {
  display: inline-block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto;
  fill: var(--color-text-offset);
}

.skills .skills-list > li > p {
  font-weight: 600;
  color: var(--color-primary);
}

.skills .skills-list > li:hover svg,
.skills .skills-list > li:hover p {
  fill: var(--color-primary);
  color: var(--color-text-offset);
}

/* Design and layout of Contact section */

.contact .email {
  align-items: center;
  display: flex;
  margin-top: 1rem;
  font-family: var(--font-secondary);
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.contact .email a {
  color: var(--color-text);
  font-family: var(--font-secondary);
}

.contact .email svg {
  fill: var(--color-primary);
}

.contact .platforms {
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.contact .platforms > h3 {
  font-family: var(--font-secondary);
  font-size: 0.9375rem;
  letter-spacing: 1px;
  margin-right: 0.5rem;
}

.contact .media-list {
  padding: 0;
  display: inline-flex;
}

.contact .media-list-item {
  list-style: none;
}

.contact .media-list-item > a {
  color: var(--color-text-offset);
  display: block;
  padding: 0.5rem;
}

.contact .media-list-item svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: var(--color-text-offset);
}

.contact .contact-map {
  position: relative;
  width: 90%;
  margin: 3rem auto 0;
}

/* Design and Layout of Footer Section */
.footer > div {
  display: flex;
  flex-flow: column;
  align-items: center;
  border-top: 1px solid var(--color-text);
  padding: 1rem 0;
}

.footer .section-text {
  display: flex;
  align-items: center;
  margin: 0;
}

.footer .section-text > span:first-child {
  font-size: 0.9375rem;
  font-family: var(--font-secondary);
  margin-right: 0.5rem;
}

.footer .brand-icon {
  display: inline-block;
  padding: 0.5rem;
  background-color: var(--color-secondary);
  border-radius: 50%;
  animation: spin 1.6s ease-in-out 1s infinite alternate;
}

.footer .brand-icon > img {
  width: 1.25rem;
  height: 1.25rem;
}

@keyframes spin {
  0% {
    transform: rotateY(0);
  }

  100% {
    transform: rotateY(180deg);
    background-color: var(--color-secondary-offset);
  }
}

.footer .media-list {
  display: flex;
  padding: 0;
}

.footer .media-list-item {
  list-style: none;
}

.footer .media-list-item > a {
  color: var(--color-text-offset);
  display: block;
  padding: 0.5rem;
}

.footer .media-list-item svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--color-text-offset);
}

/* Small devices (landscape phones, 576px and up) */
@media screen and (min-width: 576px) {
  .container {
    width: 540px;
    margin: 0 auto;
    padding: 1rem 0;
  }

  .header .nav-link::first-letter {
    color: inherit;
  }

  .greeting .greeting-text > p span:last-child {
    font-size: 2.5rem;
  }

  .greeting .greeting-photo {
    display: flex;
    align-items: center;
    padding-left: 2rem;
  }

  .contact .contact-map > address {
    position: absolute;
    top: 2rem;
    left: 2rem;
    text-align: left;
    background-color: var(--color-bg-offset);
  }
}

/* Medium devices (tablets, 768px and up) */
@media screen and (min-width: 768px) {
  .container {
    width: 720px;
  }

  .header .header-inner {
    flex-direction: row;
    justify-content: space-between;
    margin: 0 auto;
    width: 90vw;
  }

  .header .nav {
    width: auto;
    padding: 0;
  }

  .header .nav-item {
    padding: 0 0.625rem;
  }

  .portfolios .portfolios-list {
    justify-content: space-around;
  }

  .portfolios .portfolio-item {
    flex: 25%;
    max-width: 25%;
  }

  .footer > div {
    flex-flow: row;
    justify-content: space-between;
    padding: 1rem 2rem;
  }
}

/* Large devices (large desktops, 992px and up) */
@media screen and (min-width: 992px) {
  .container {
    width: 960px;
  }

  .greeting {
    justify-content: space-around;
  }

  .greeting .greeting-text > p span:first-child {
    font-size: 1.5rem;
  }

  .greeting .greeting-text > p span:last-child {
    font-size: 3.5rem;
  }

  .greeting .greeting-text > p:last-child {
    font-size: 1.5rem;
  }

  .section-title {
    margin: 0 auto;
    width: 90vw;
    font-size: 2rem;
  }

  .section-text {
    margin: 0.6rem auto 0;
    width: 90vw;
  }

  .about-me > div {
    display: flex;
    margin-top: 1rem;
  }

  .about-me .about-me-text {
    flex: 65%;
    max-width: 65%;
  }

  .about-me .about-me-text {
    margin: 0;
  }

  .portfolios .portfolios-list {
    margin: 2rem auto 0;
    width: 90vw;
  }

  .contact > div {
    display: flex;
  }

  .contact .text-zone {
    flex: 50%;
    min-width: 50%;
  }

  .contact .section-text {
    width: 90%;
  }

  .contact .platforms,
  .contact .email {
    padding: 0 2rem;
  }

  .contact .contact-map {
    margin: 0;
    align-self: center;
  }
}

/* X-Large devices (large desktops, 1200px and up) */
@media screen and (min-width: 1200px) {
  .container {
    width: 1140px;
  }

  .header .nav-item {
    padding: 0 0.875rem;
  }

  .about-me .about-me-photo {
    width: 250px;
    height: 250px;
  }

  .about-me > div {
    margin-top: 1.75rem;
  }

  .about-me .about-me-text {
    padding-right: 5rem;
  }

  .portfolios .portfolio-item {
    flex: 16.67%;
    max-width: 16.67%;
  }

  .footer > div {
    padding: 1rem 3rem;
  }
}

/* XX-Large devices (larger desktops, 1400px and up) */
@media screen and (min-width: 1400px) {
  .container {
    width: 1320px;
  }

  .greeting {
    justify-content: space-between;
  }

  .greeting .greeting-photo {
    margin-right: 1rem;
  }

  .about-me .about-me-text {
    padding-right: 8rem;
  }
}
