@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,900;1,700&display=swap");
/* Variables */

:root {
  --font-family: "Roboto", sans-serf;
  --normal-font: 400;
  --bold-font: 700;
  --bolder-font: 900;
  --bg-color: #f9efe7;
  --primary-color: #4756df;
  --secondary-color: #ff751f;
  --primary-shadow: #8b8eaf;
  --secondary-shadow: #a17a69;
  --bottom-margin: 0.5rem;
  --bottom-margin-2: 1rem;
  --line-height: 1.7rem;
  --transition: 0.3s;
}

/* Variables end */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* adjust to your navbar height */
}

/* CSS Resets */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* border: 2px solid red; */
}

ul {
  list-style-type: none;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: none;
  color: var(--secondary-color);
  /* color: #0073b2;
  background: #d3d3d3; */
}

body {
  font-family: var(--font-family);
  /*max-width: 1219px;
  margin: 0 auto;*/
}

.logo {
  animation: slideRight 1 ease forwards;
}

/* @keyframes slideRight {
  0% {
    transform: translate(-100px);
    opacity: 0;
}
100% {
  transform: translate(0px);
  opacity: 1;
} */

section {
  /* max-width: 1100px;
  margin: auto; */
}

/* CSS Resets end */

/* Navbar */

nav {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 3.5rem;
  background-color: var(--bg-color);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

nav h1 {
  color: var(--primary-color);
}
nav img {
  height: 60px;
}

nav a {
  color: var(--secondary-color);
  transition: var(--transition);
}

nav a:hover {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

nav ul {
  display: flex;
  gap: 1.9rem;
}

nav ul li {
  font-weight: var(--bold-font);
}

.burger-menu {
  /* color: var(--primary-color); */
  /* color: #4756df; */
  font-size: 2rem;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  display: none;
}

/* Navbar ends */

/* Hero section */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  max-width: 68.75rem;
  margin: auto;
}
.hero h3 {
  font-size: 32px;
  font-weight: 700;
}
.hero h3:nth-of-type(2) {
  margin-bottom: 15px;
}
.hero h3 span {
  color: #0073b2;
}
.hero h1 {
  font-size: 46px;
  font-weight: 700;
  margin: -3px 0;
}
.hero p {
  font-size: 20px;
}
.hero img {
  height: 22.5rem;
  width: 22.5rem;
}
.home-sci a {
  /* display: inline-flex;
  justify-content: center;
  align-items: center; */
  width: 40px;
  height: 40px;
  background: #f3f5f6;
  border: 2px solid #d3d3d3;
  border-radius: 50%;
  font-size: 25px;
  color: #0073b2;
  text-decoration: none;
  /* margin: 15px 15px 30px 0; */
}
.home-sci a:hover {
  background: #0073b2;
  color: #f3f5f6;
  box-shadow: 0 0 20px #0073b2;
  border-bottom: none;
}
.btn-box {
  display: inline-block;
  padding: 12px 28px;
  background: #0073b2;
  border-radius: 40px;
  font-size: 16px;
  color: #fff;
  letter-spacing: 1px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 20px;
}
.btn-box:hover {
  box-shadow: 0 0 20px #0073b2;
  color: #0073b2;
  background: #f3f5f6;
}
.bio {
  width: 35rem;
  padding: 0.625rem;
  /* border-radius: 6px;
  box-shadow: 0px 2px 15px 2px var(--primary-shadow); */
}

.bio h1 {
  margin-bottom: var(--bottom-margin);
}

.bio p {
  line-height: var(--line-height);
  padding: 0.3rem 0;
}
.bio-title {
  color: var(--primary-color);
}

/* Hero section ends */

/* More about */

.more-about {
  background-color: var(--bg-color);
  padding: 1rem 6rem;
}

.more-about h2 {
  margin-bottom: var(--bottom-margin);
  text-align: center;
}

.more-about p {
  line-height: var(--line-height);
  padding: 0.4rem;
}

/* More about ends */

/* Skills section */

.skills {
  max-width: 68.75rem;
  margin: auto;
  text-align: center;
  margin-top: 2.5rem;
}

.skill-header {
  margin-bottom: 1rem;
}

.skills-wrapper img {
  padding: 1.25rem;
}

.icon {
  width: 11.875rem;
  height: 11.25rem;
}

/* === Skills Tabs + Flip Card (fixed overlay) === */
.skill-toggle {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1rem;
  flex-wrap: wrap;
  max-width: 68.75rem;
}

.tab-btn {
  padding: 0.55rem 1rem;
  border: 2px solid var(--primary-color);
  background: #fff;
  color: var(--primary-color);
  border-radius: 999px;
  font-weight: var(--bold-font);
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn:hover {
  background: var(--primary-color);
  color: #fff;
}
.tab-btn.active {
  background: var(--primary-color);
  color: #fff;
}

/* add or update these */
.flip-card {
  perspective: 1000px;
  max-width: 68.75rem;
  margin: 0 auto;
  position: relative;
  /* baseline height so content is visible before JS measures */
  min-height: 360px;
}

.flip-card-inner {
  background-color: var(--bg-color);
  position: relative;
  width: 100%;
  height: 100%; /* ✅ key: let faces fill the measured height */
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
  will-change: transform;
}
.flip-card-inner.show-back {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute; /* stack faces */
  inset: 0; /* top/right/bottom/left: 0 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  padding: 1rem 0;
}

.flip-card-face.front {
  transform: rotateY(0deg);
  z-index: 2;
}

.flip-card-face.back {
  transform: rotateY(180deg);
  z-index: 1;
}

.pro-skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1rem;
  justify-items: center;
}
.pro-skill-card {
  width: 100%;
  text-align: center;
  font-weight: var(--bold-font);
  padding: 1rem 0.75rem;
}

/* Tighter layout on small screens */
@media (max-width: 720px) {
  .pro-skills-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}
@media (max-width: 420px) {
  .pro-skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Skills section ends */

/* Projects section */

.projects {
  background-color: var(--bg-color);
  padding: 32px 0;
  margin-top: 2rem;
}

.projects-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.projects-title {
  text-align: center;
  margin-bottom: 1rem;
}

.project-container {
  text-align: center;
  width: 21.875rem;
  padding: 1rem;
}

.project-container p {
  padding: 0.4rem;
}

.project-title {
  margin-bottom: var(--bottom-margin);
}

.project-details {
  margin-bottom: var(--bottom-margin);
}

.project-pic {
  width: 65%;
  height: 60%;
}

/* Projects section ends */

/* Contacts section */

.contact {
  margin-top: 2rem;
}

.contact h2 {
  text-align: center;
  margin-bottom: var(--bottom-margin-2);
}

.contact-form-container {
  max-width: 40.75rem;
  margin: 0 auto;
  padding: 0.938rem;
  border-radius: 5px;
  box-shadow: 0 3px 10px var(--secondary-shadow);
}

.contact-form-container label {
  line-height: 2.7em;
  font-weight: var(--bold-font);
  color: var(--primary-color);
}

.contact-form-container textarea {
  min-height: 6.25rem;
  font-size: 14px;
}

.contact-form-container .input-field {
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  border: none;
  border: 2px outset var(--primary-color);
  font-size: 0.875rem;
  outline: none;
}

.input-field::placeholder {
  padding: 0.5rem;
  color: var(--primary-color);
}

.submit-btn {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  background-color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  font-size: 1rem;
  font-weight: var(--bold-font);
  transition: var(--transition);
}

.submit-btn:hover {
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  cursor: pointer;
}

/* Contacts section ends */

/* Social buttons */

.socials {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 1%;
  bottom: 50%;
}

.socicon {
  width: 2rem;
  height: 2rem;
}

/* Social button ends */

/* Scroll to top button */

.scroll-up {
  position: fixed;
  right: 0.5%;
  bottom: 3%;
  cursor: pointer;
}

.up-arrow {
  width: 3rem;
  height: 3rem;
}

/* Scroll to top button ends */

/* Footer section */

footer {
  background-color: var(--bg-color);
  padding: 1.25rem;
  text-align: center;
  margin: 2rem 0 0;
}

/* Footer section ends */

/* General (utilities) */

.icon-card {
  background-color: #fff;
  border-radius: 11px;
  box-shadow: 0 3px 10px var(--secondary-shadow);
  padding: 20px;
  margin: 10px;
}

.project-card {
  background-color: #fff;
  border-radius: 11px;
  box-shadow: 0 3px 10px var(--primary-shadow);
  padding: 20px;
  margin: 10px;
}

/* Media queries for responsiveness */

@media (max-width: 720px) {
  nav {
    padding: 0.3rem 1rem 0.3rem 1rem;
  }
  nav ul {
    position: fixed;
    background-color: var(--bg-color);
    flex-direction: column;
    top: 66px;
    left: 10%;
    width: 80%;
    text-align: center;
    transform: translateX(120%);
    transition: transform 0.5s ease-in;
  }
  nav ul.show {
    transform: translateX(0);
  }
  nav ul li {
    margin: 8px;
  }
  .burger-menu {
    display: block;
    color: var(--secondary-color);
  }
  .hero {
    /* margin-top: 8rem; */
    padding-top: 8rem;
    flex-direction: column;
    gap: 0;
  }
  .bio {
    margin-top: -7rem;
    width: 22rem;
  }
  .hero img {
    height: 37.5rem;
    width: 30rem;
  }
  .more-about {
    margin-top: 2rem;
    padding: 1rem 3.5rem;
  }
  .more-about h2 {
    text-align: center;
  }
  .more-about p {
    text-align: justify;
  }
  .icon {
    width: 5.875rem;
    height: 5.25rem;
  }
  .projects-container {
    flex-direction: column;
  }
  .project-container {
    width: 20.875rem;
  }
  .contact-form-container {
    max-width: 23.75rem;
  }
  /* slightly reduce the flip-card’s baseline height on mobile */
  .flip-card {
    min-height: 180px; /* was 360px; JS will still set exact height */
  }
}

@media (max-width: 420px) {
  .hero h3:nth-of-type(2) {
    /* the "And I'm a <span class="text">" line */
    display: block;
    min-height: calc(1.2em * 2); /* always reserve space for 2 lines */
  }
  .hero img {
    height: 22rem;
    width: 20rem;
  }
  .bio {
    width: 22rem;
    margin-bottom: 4rem;
  }
  .project-container {
    width: 17.875rem;
  }
  .contact-form-container {
    max-width: 17.75rem;
  }
}
