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

/* Global Variables */
html {
  cursor: none;
  scroll-behavior: smooth;
}

:root {
  --primary-color: #000000;
  --primary-subtle1-color: #61646b;
  --primary-subtle2-color: #afb1b6;
  --primary-background-color: #ffffff;
  --background-color: #efeff0;
  --accent-color: red;
}

* {
  font-family: "Ubuntu";
  padding: 0;
  margin: 0;
}

main {
  position: relative;
}

/* Typography styles */

:is(h1, h2, h3, h4, h5, h6) {
  color: var(--primary-color);
}

h1 {
  font-size: 56px;
}

h2 {
  font-size: 40px;
}

h3 {
  font-size: 32px;
}

h4 {
  font-size: 28px;
}

h5 {
  font-size: 24px;
}

h6 {
  font-size: 18px;
}

p {
  color: var(--primary-subtle2-color);
  font-weight: 300;
  font-size: 14px;
  line-height: 28px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navbar style */

header {
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  text-transform: uppercase;
  font-weight: 300;
  position: relative;
}

nav {
  display: none;
}

nav ul {
  list-style-type: none;
}
nav ul li {
  display: inline-block;
  margin-inline: 0.75rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.5s;
  position: relative;
}

nav ul li a::after {
  content: "";
  width: 0%;
  height: 1px;
  background-color: var(--accent-color);
  position: absolute;
  top: 100%;
  left: 0%;
  transition: all 0.8s;
}

nav ul li a:hover::after {
  width: 100%;
}
nav ul li a.active::after {
  width: 100%;
}

/* Mobile Navbar  */

.mobile-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu .hamburger {
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  position: relative;
  cursor: pointer;
}

.mobile-menu .hamburger::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  top: 10px;
  background-color: var(--primary-color);
}

.mobile-menu .hamburger::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 2px;
  top: -10px;
  background-color: var(--primary-color);
}

.mobile-menu .hamburger.active {
  visibility: hidden;
}

.mobile-menu .hamburger.active::after {
  transform: translateY(-10px) rotate(45deg);
  visibility: visible;
}

.mobile-menu .hamburger.active::before {
  transform: translateY(10px) rotate(-45deg);
  visibility: visible;
}

.mobile-menu ul {
  position: absolute;
  left: 0;
  opacity: 0;
  top: 100%;
  padding: 1rem;
  background-color: var(--background-color);
  width: -webkit-fill-available;
  list-style: none;
  transition: all 0.6s ease-out;
}

.mobile-menu ul.active {
  z-index: 2;
  opacity: 1;
}

.mobile-menu ul li a {
  text-decoration: none;
  color: var(--primary-subtle1-color);
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Button styles */

button {
  width: 180px;
  height: 60px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--primary-color);
  outline: none;
  transition: 1s ease-in-out;
  position: relative;
  text-transform: uppercase;
}

button svg {
  position: absolute;
  left: 0;
  top: 0;
  fill: none;
  stroke-width: 3px;
  stroke: var(--primary-color);
  stroke-dasharray: 150 480;
  stroke-dashoffset: 150;
  transition: 1s ease-in-out;
}

button:hover {
  transition: 1s ease-in-out;
  background: var(--background-color);
  border: none;
}

button:hover svg {
  stroke-dashoffset: -480;
}

button:is(.contact-btn) {
  display: none;
}

/*
button.outline {
  border: 1px solid var(--primary-subtle1-color);
}

button.outline:is(:hover, :focus) {
  background-color: var(--primary-color);
  color: var(--primary-background-color);
}

button.fill {
  background-color: var(--primary-color);
  color: var(--primary-background-color);
}

button.fill:is(:hover, :focus) {
  background-color: var(--background-color);
  color: var(--primary-color);
} */

.contact-icon-btn {
  background-color: var(--primary-subtle1-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.contact-icon-btn img {
  width: 20px;
}

.contact-icon {
  width: 20px;
}

/* Grid Styles */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 20px;
}

.grid-item {
  text-align: left;
  background-color: var(--primary-background-color);
}

.grid-item img:not(.contact-icon) {
  width: 100%;
}

.grid-2.reverse-order .grid-item:nth-child(2) {
  order: 1;
}
.grid-2.reverse-order .grid-item:nth-child(1) {
  order: 2;
}

/* Section global styles */

section {
  text-align: center;
  position: relative;
  z-index: 1;
}

section:not(#hero) {
  width: 90%;
  margin: 0 auto;
}

section h2 {
  margin-bottom: 2rem;
}

/* Hero Section styles */

#hero {
  background-image: url(./images/MinarePakistan.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 80vh;
  background-color: rgba(255, 255, 255, 0.9);
  background-blend-mode: overlay;
}

#hero .content {
  text-align: center;
  width: min(1000px, 100%);
  margin: 0 auto;
}

#hero .content h1 {
  padding-block: 3rem;
}

#hero .content h4 {
  padding-bottom: 3rem;
}

#hero .content p {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
}

.box {
  position: relative;
  height: 50vh;
}

.box h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  text-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  font-size: 4em;
  margin: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
}

.box h1:nth-child(2) {
  background: #ffffff;
  color: #fff;
  overflow: hidden;
  z-index: 2;
  transition: 0.5s;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0% 100%);
}

.box h1:nth-child(2):hover {
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.box h1:nth-child(1):hover ~ h1 {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}

/* SVG animation Line */

.line {
  position: absolute;
  z-index: 0;
  left: 50%;
  transform: translate3d(-43%, -230px, 0);
  display: none;
}

@media (width <= 1290px) {
  .line {
    display: none;
  }
}

/* Education Section styles */

#education {
  padding-top: 2rem;
}

/* Footer Section styles */

#footer {
  background-color: var(--background-color);
  padding: 2rem 1rem;
  text-align: center;
  font-weight: 300;
  position: relative;
  bottom: -45vh;
}

/* Steps Homepage Styles */

.steps {
  background-color: var(--primary-background-color);
}

.steps li {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 20px;
  padding-bottom: 2rem;
}

.steps li .step-count {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--primary-subtle2-color);
  background-color: var(--primary-background-color);
  position: relative;
  color: var(--primary-subtle2-color);
  aspect-ratio: 1;
}

.steps li:not(:last-child) .step-count:after {
  content: "";
  width: 1px;
  background-color: var(--primary-subtle2-color);
  position: absolute;
  top: 100%;
  height: 100%;
  padding-top: 50%;
}

.steps li p {
  display: none;
}

/* Education Page styles */

.education h1 {
  margin-block: 3rem;
}

.education section h6 {
  margin-bottom: 2rem;
}

/* Contact Form styles */

#contact h1 {
  margin-block: 3rem;
}

#contact p {
  margin-block: 2rem;
}

#contact .grid-item ul {
  list-style-type: none;
}

#contact .grid-item ul li {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 1rem;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

#contact-form :is(input, textarea) {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--primary-subtle2-color);
}

input::placeholder,
textarea::placeholder {
  color: var(--primary-subtle2-color);
}

#success-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  padding: 2rem;
  background-color: var(--background-color);
  width: min(300px, 90%);
  border-radius: 8px;
  z-index: 2;
  display: none;
}
#success-modal p {
  color: var(--primary-subtle1-color);
  font-weight: 500;
  font-size: 18px;
}

#overlay {
  display: none;
  position: fixed;
  width: 100%;
  height: 100vh;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

span[id$="display"] {
  color: var(--primary-color);
  font-weight: 700;
}

.cursor {
  width: 50px;
  height: 50px;
  border-radius: 100%;
  border: 1px solid black;
  transition: all 200ms ease-out;
  position: fixed;
  pointer-events: none;
  left: 0;
  top: 0;
  transform: translate(calc(-50% + 15px), -50%);
  z-index: 1000;
}

.cursor2 {
  width: 20px;
  height: 20px;
  border-radius: 100%;
  background-color: black;
  opacity: 0.3;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
  z-index: 1000;
}

.hover {
  background-color: red;
  opacity: 0.5;
}

/* Portfolio Grid Styles */

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 3rem 0;
  padding: 0;
  list-style: none;
  margin-top: 5rem;
}

.portfolio-grid-item {
  background: var(--primary-background-color);
  border-radius: 12px;
  box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.portfolio-card {
  transition: box-shadow 0.3s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-card:hover {
  transform: perspective(800px) scale(1.04) rotateY(6deg) rotateX(2deg);
  z-index: 2;
}

.portfolio-grid-item:hover {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.portfolio-grid-image {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  background-color: var(--primary-color);
  padding: 1rem;
  object-fit: contain;
  box-sizing: border-box;
}

.portfolio-grid-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-grid-title {
  font-size: 24px;
  color: var(--primary-subtle1-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.portfolio-grid-description {
  color: var(--primary-subtle2-color);
  font-size: 16px;
  margin-bottom: 1.5rem;
  flex: 1;
}

.portfolio-grid-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.portfolio-grid-tag {
  background: var(--background-color);
  color: var(--primary-subtle1-color);
  font-size: 13px;
  padding: 0.3em 1em;
  border-radius: 20px;
  border: 1px solid var(--primary-subtle2-color);
}

.portfolio-grid-links {
  display: flex;
  gap: 1rem;
}

.portfolio-grid-link {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: underline;
  transition: color 0.2s;
}

.portfolio-grid-link:hover {
  color: var(--primary-color);
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
}

@media (min-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 80px;
  }
}

/* Desktop Styles */

@media (width >= 1098px) {
  .box h1 {
    font-size: 7em;
  }

  h2 {
    font-size: 48px;
  }

  h3 {
    font-size: 40px;
  }

  h4 {
    font-size: 32px;
  }

  h5 {
    font-size: 28px;
  }

  h6 {
    font-size: 24px;
  }
  nav {
    display: inherit;
  }
  header {
    padding: 1rem 3rem;
  }
  button:is(.contact-btn) {
    display: inline-block;
  }
  .mobile-menu {
    display: none;
  }
  .contact-icon-btn {
    display: none;
  }
  .line {
    display: inherit;
  }
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  #hero {
    background-color: transparent;
  }
  #hero {
    background-position-y: -50px;
    background-position-x: 105%;
    height: 100vh;
  }
  .steps li .step-count {
    width: 40px;
    height: 40px;
  }
  section:not(#hero) {
    width: 80%;
    margin: 0 auto;
  }
  .grid-2 {
    gap: 150px;
  }
  .grid-2.reverse-order .grid-item:nth-child(2) {
    order: 2;
  }
  .grid-2.reverse-order .grid-item:nth-child(1) {
    order: 1;
  }
}

/* Ipad styles */

@media (width >= 768px) {
  .steps li p {
    display: inherit;
  }
}

@media (768px < width < 1390px) {
  .steps li {
    padding-bottom: 1rem;
  }
  h6 {
    font-size: 20px;
  }
}
