/* Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100..900;1,100..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");

/* Custom CSS */
:root {
  --primary-bg: #020617;
  --secondary-bg: #0f172a;
  --text-clr: #f8fafc;
  --text-hover: #cbd5e1;
  --card-color: #1e293b;
  --card-border: #94a3b8;
  --default-font: "Source Sans 3", serif;
  --para-font: "Montserrat", serif;
  --cinzel-font: "Cinzel", serif;
  --raleway-font: "Raleway", serif;
  --poppins-font: "Poppins", serif;
  /* Disabling Zoom */
  touch-action: pan-x pan-y;
  height: 100% 
}

/* Global CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--default-font);
  scroll-behavior: smooth;
}

body {
  background: var(--primary-bg);
}

section h2 {
  text-align: center;
  font-size: 2rem;
  font-family: var(--raleway-font);
}

a {
  position: relative;
  text-decoration: none;
  color: var(--text-clr);
  transition: color 0.2s;
}

a:hover {
  color: var(--text-hover);
}

a::after {
  content: "";
  position: absolute;
  height: 1.5px;
  right: 0;
  bottom: 0;
  width: 0;
  background: var(--text-hover);
  transition: width 0.2s;
}

a:hover::after {
  width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--text-hover);
  border: var(--text-hover);
}

::-webkit-scrollbar-track {
  background-color: var(--primary-bg);
}

/* Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
  backdrop-filter: blur(10px);
  box-shadow: 0px 1px 10px var(--secondary-bg);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-clr);
  padding: 15px 50px;
}

nav > span > h1 {
  font-family: var(--cinzel-font);
  font-weight: 500;
}

#navbar {
  list-style: none;
  display: flex;
  gap: 10px;
}

#menu {
  display: none;
}

/* Hero */
#hero {
  background-color: var(--secondary-bg);
  color: var(--text-clr);
  height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 150px;
}

#hero > h1 {
  font-family: var(--raleway-font);
  font-size: 3rem;
  font-weight: 600;
}

#hero > h2 {
  font-family: var(--cinzel-font);
  font-size: 2rem;
  font-weight: 500;
}

#hero > p {
  font-family: var(--para-font);
  margin-top: 15px;
  font-size: 1.1rem;
}

/* Resume */
.container {
  display: flex;
}

.items {
  width: 70%;
}

.heading {
  width: fit-content;
  height: fit-content;
  position: sticky;
  top: 50px;
  left: 0;
  padding-top: 50px;
}

#resumesec {
  background-color: var(--primary-bg);
  color: var(--text-clr);
  padding: 50px 50px 50px 150px;
}

.heading > h2 {
  text-align: left;
}

.heading > a {
  font-family: var(--para-font);
}

#experience {
  background-color: var(--card-color);
  color: var(--text-clr);
  border-top: 4px solid var(--card-border);
  min-width: 500px;
  max-width: 65%;
  margin-inline: auto;
  padding: 30px 20px 40px 20px;
  margin-bottom: 40px;
}

#experience > h2 {
  margin-bottom: 30px;
}

#experience > .resumeitem:nth-child(2) {
  padding-bottom: 0;
}

#education {
  background-color: var(--card-color);
  color: var(--text-clr);
  border-top: 4px solid var(--card-border);
  min-width: 500px;
  max-width: 65%;
  margin-inline: auto;
  padding: 30px 20px 40px 20px;
}

#education > h2 {
  margin-bottom: 30px;
}

.resumeitem {
  padding: 0 0 35px 25px;
  position: relative;
  border-left: 2px solid var(--card-border);
  left: 15px;
  top: 0;
}

.resumeitem:nth-child(3) {
  padding-bottom: 0;
}

.resumeitem::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50px;
  left: -11px;
  top: 0;
  background: var(--card-border);
  border: 2px solid var(--card-border);
}

.resumeitem > h4 {
  font-family: var(--para-font);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.resumeitem > h3 {
  font-family: var(--raleway-font);
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.resumeitem > h5 {
  font-family: var(--poppins-font);
  font-weight: 400;
  color: #999999;
  font-size: 1.2rem;
}

.content {
  position: relative;
}

.prjdemo {
  position: absolute;
  right: 5px;
  top: 15px;
}

.prjdemo a {
  margin-right: 5px;
  font-family: var(--poppins-font);
  font-size: 0.9rem;
}

#resumelink {
  text-align: center;
  margin-top: 20px;
}

/* Projects */
#prjsec {
  background-color: var(--secondary-bg);
  color: var(--text-clr);
  padding: 50px 50px 50px 150px;
}

.heading > p {
  font-family: var(--para-font);
}

.heading {
  width: 30%;
}

.img img {
  width: 450px;
}

.cards {
  width: fit-content;
  max-width: 950px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--card-border);
  padding: 10px;
  margin-bottom: 40px;
  transition: opacity 0.2s ease-in-out;
}

#cardsContainer {
  width: max-content;
  margin: auto;
}

#cardsContainer:hover .cards:not(:hover) {
  opacity: 0.5;
}

.cards:hover {
  opacity: 1;
}

.cards:last-child {
  margin-bottom: 0;
}

.content {
  padding: 20px;
}

.content > h5 {
  font-family: var(--poppins-font);
}

.content > h3 {
  font-family: var(--raleway-font);
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.content > p {
  font-family: var(--para-font);
  line-height: 1.5rem;
}

/* Contact */
#contactsec {
  background-color: var(--primary-bg);
  color: var(--text-clr);
  padding: 50px 50px 50px 150px;
}

#reachout {
  width: 65%;
  margin-inline: auto;
  margin-bottom: 40px;
}

#reachout > h3 {
  font-size: 1.5rem;
  font-family: var(--raleway-font);
  margin-bottom: 10px;
}

#sociallinks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-family: var(--para-font);
  font-size: 1.2rem;
}

#sendmsg {
  width: 65%;
  margin-inline: auto;
}

#sendmsg > h3 {
  font-size: 1.5rem;
  font-family: var(--raleway-font);
}

input,
textarea {
  outline: none;
  background: transparent;
  border: none;
  width: 100%;
  height: 100%;
  color: var(--text-clr);
  font-size: 1em;
  font-weight: 600;
  padding: 0 35px 0 5px;
  border-bottom: 2px solid var(--text-clr);
}

.input-box,
.message-box {
  width: 100%;
  margin: 30px 0;
  position: relative;
}

.input-box {
  height: 50px;
}

textarea {
  resize: none;
}

.input-box label,
.message-box label {
  position: absolute;
  left: 2%;
  transform: translateY(-50%);
  font-size: 1em;
  font-weight: 500;
  opacity: 0.5;
  pointer-events: none;
  transition: all 0.5s;
  font-family: var(--raleway-font);
}

.input-box label {
  top: 50%;
}

.message-box label {
  top: 10%;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label {
  top: -1px;
}

.message-box textarea:focus ~ label,
.message-box textarea:valid ~ label {
  top: -10px;
}

#result {
  width: 100%;
  height: 40px;
  background-color: var(--card-color);
  color: var(--text-clr);
  font-family: var(--para-font);
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

#result:hover {
  background-color: var(--secondary-bg);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.invalid-feedback,
.empty-feedback {
  display: none;
}

.was-validated :placeholder-shown:invalid ~ .empty-feedback {
  display: block;
}

.was-validated :not(:placeholder-shown):invalid ~ .invalid-feedback {
  display: block;
}

.is-invalid,
.was-validated :invalid {
  border-bottom: 2px solid #dc3545;
}

.empty-feedback p,
.invalid-feedback p {
  position: absolute;
  right: 0;
  top: 0;
  color: var(--text-hover);
  font-size: 0.8em;
  font-style: italic;
  font-family: var(--para-font);
  text-transform: capitalize;
}

/* Footer */
footer {
  height: 100px;
  background-color: var(--primary-bg);
  color: var(--text-clr);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#socials > a {
  color: var(--text-clr);
  font-size: 1.5rem;
  transition: color 0.2s;
}

#socials > a:hover {
  color: var(--text-hover);
}

/* Multi Device Compatibility */
@media only screen and (max-width: 1500px) {
  .cards {
    flex-wrap: wrap;
    max-width: 500px;
  }
}

@media only screen and (max-width: 1100px) {
  .container {
    gap: 40px;
  }
}

@media only screen and (max-width: 870px) {
  @keyframes fade {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #navbar li a {
    display: none;
  }

  #menu {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
  }

  #menu-close {
    display: none;
  }

  #menu-open {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  nav,
  #navbar li a,
  #menu-close {
    animation: fade 0.4s ease-in-out;
  }

  nav.navactive {
    flex-direction: column;
    gap: 10px;
    height: 100%;
  }

  nav.navactive #menu-open {
    display: none;
  }

  nav.navactive #menu-close {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  nav.navactive #navbar li a {
    display: flex;
  }

  #hero {
    align-items: center;
    padding: 50px;
  }

  .container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  #resumesec {
    padding: 50px;
  }

  #prjsec {
    padding: 50px;
  }

  #contactsec {
    padding: 50px;
  }

  .heading h2,
  p {
    text-align: center;
  }

  .heading {
    width: 100%;
    position: relative;
    text-align: center;
    margin-bottom: 40px;
  }

  #experience {
    margin-inline: 0;
    transform: scale(0.8);
    margin-bottom: 0;
  }

  #education {
    margin-inline: 0;
    transform: scale(0.8);
  }

  .items {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .cards {
    transform: scale(0.8);
    margin: 0 0 -50px 0;
  }

  .cards p {
    text-align: left;
  }

  #cardsContainer {
    margin-inline: 0;
  }

  #reachout {
    margin-inline: 0;
    width: 100%;
  }

  #sendmsg {
    margin-inline: 0;
    width: 100%;
  }
}

@media only screen and (max-width: 540px) {
  nav {
    padding: 15px 40px;
  }

  #hero h1 {
    font-size: 2rem;
  }

  #hero p {
    margin-top: 10px;
    font-size: .95rem;
  }

  .heading {
    padding: 0;
  }

  #experience {
    min-width: 440px;
  }

  #education {
    min-width: 440px;
  }

  #cardsContainer {
    width: 100%;
  }

  .cards {
    width: 100%;
    margin: 0 0 -50px 0;
  }

  .cards img {
    width: 100%;
  }

  #prjsec {
    padding: 0 0 50px 0;
  }

  #resumesec {
    padding: 0 0 50px 0;
  }

  #contactsec {
    padding: 30px;
  }
}
