/* RESET browser preset styling */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  overflow-wrap: break-word;
  color: var(--secondary-text-color);
}

h2 {
  font-size: 2rem;
  color: var(--primary-text-color);
  text-align: center;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
}

p {
  font-family: 'Poppins', sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

/* VARIABLES */

:root {
  /* COLORS */
  /* Background */
  --body-bg-color: linear-gradient(
    100deg,
    rgb(48, 14, 73) 37.3%,
    rgb(57, 9, 136) 73.5%
  );

  /* Text */
  --primary-text-color: #ffffff; /* Soft mint white for emphasis */
  --secondary-text-color: #ffffff; /* Light gray-blue for body text */

  /* Sections */
  --section-padding: 5rem 1rem;

  /* Cards */
  --card-border-radius: 0.75rem;
  --card-padding: 2rem;
  --card-bg-color: linear-gradient(
    100deg,
    rgb(27, 2, 44) 37.3%,
    rgb(20, 2, 49) 73.5%
  );
  --accent: rgb(248, 183, 2);
}

/* GENERAL STYLES */

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  height: 100dvh;
  background-image: var(--body-bg-color);
  overflow-x: hidden;
}

/* Header */

header {
  background-color: rgb(50, 10, 88);
  padding: 1.25rem 0;
  color: var(--secondary-text-color);
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease-in-out;
}

.container {
  width: 90%;
  max-width: 75rem;
  margin: 0 auto;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#logo-text {
  text-decoration: none;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.05rem;
  color: var(--secondary-text-color);
  font-family: 'Playfair Display', serif;
  transition: color 0.3s ease-out;
}

#logo-text:hover {
  color: rgb(167, 126, 167);
}

nav ul {
  display: flex;
  list-style: none;
}

nav a {
  text-decoration: none;
  margin-inline: 0.5em;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--secondary-text-color);
  transition: color 0.3s ease-out;
}

nav a:hover {
  color: var(--primary-text-color);
}

.nav-links .active {
  color: var(--primary-text-color);
}

.no-scroll {
  overflow: hidden;
  height: 100dvh;
}

/* Hide default checkbox */
#menu-toggle {
  display: none;
}

/* Hamburger icon */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  z-index: 1000;
}

.hamburger span {
  background-color: var(--secondary-text-color);
  width: 30px;
  height: 3px;
  margin: 0.1875rem 0;
  transition: 0.3s ease;
}

.page-content {
  padding-top: 5rem;
}

/* Hero section */

.hero {
  text-align: center;
  padding: 9.375rem 0;
}

.hero h1 {
  font-size: 3.125rem;
  margin-bottom: 1rem;
}

.wave {
  display: inline-block;
  animation: wave 1.5s infinite ease-in-out;
}

@keyframes wave {
  0%,
  50%,
  100% {
    transform: rotate(20deg);
  }

  25%,
  75% {
    transform: rotate(0deg);
  }
}

.hero-name-text {
  background: linear-gradient(
    98.7deg,
    rgba(6, 238, 243, 1) 10.6%,
    rgba(34, 126, 209, 1) 72.2%,
    rgb(1, 46, 247) 122.5%,
    rgba(35, 44, 51, 1) 122.5%
  );
  background-clip: text; /* Standard property */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-name-text:hover {
  background: var(--primary-text-color);
  background-clip: text; /* Standard property */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: all 0.5s ease;
}

.hero p {
  font-size: 1.125rem;
  max-width: 37.5rem;
  margin: 2rem auto;
}

.hero p span {
  color: var(--primary-text-color);
  font-weight: 500;
}

.hero-buttons a {
  padding: 0.75rem 1.5rem;
  margin: 0 0.5rem;
  border-radius: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition:
    background-color 0.3s ease-out,
    color 0.3s ease-out,
    box-shadow 0.3s ease-out;
}

.hero-buttons i {
  margin-right: 0.25rem;
}

.resume-btn {
  border: 1px solid var(--primary-text-color);
  color: var(--primary-text-color);
  box-shadow: 0 4px 6px rgba(152, 187, 245, 0.2);
}

.view-project-btn {
  background-color: var(--primary-text-color);
  color: var(--card-bg-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.hero-buttons a:hover {
  background: var(--card-bg-color);
  color: var(--secondary-text-color);
  border: var(--body-bg-color);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
}

/* About section */

#about {
  padding: var(--section-padding);
}

.about-content {
  display: flex;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: center;
}

.about-text {
  flex: 1 1 50%;
}

.about-title {
  text-align: start;
}

.about-description {
  font-size: 1.0625rem;
  margin-bottom: 1rem;
  text-align: justify;
}

.html-text,
.css-text,
.javascript-text,
.highlight {
  color: var(--accent);
  font-weight: 600;
}

.about-image-container {
  width: 300px; /* Keep it consistent with image size */
  height: 300px;
  perspective: 1000px; /* Adds 3D depth */
}

/* Inner wrapper for flipping */
.about-image-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease-in-out;
  will-change: transform; /* prevents image blur */
}

.about-image-container:hover .about-image-inner {
  transform: rotateY(180deg);
}

.about-image {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  backface-visibility: hidden;
  border: 4px solid var(--primary-text-color);
}

.back-image {
  transform: rotateY(180deg);
}

/* Services section */

#services {
  padding: var(--section-padding);
  text-align: center;
}

.services-subtitle {
  margin-bottom: 1.5rem;
  color: var(--secondary-text-color);
  font-size: 1.125rem;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  gap: 2.5rem;
}

.service-card {
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  box-shadow:
    0 4px 13px rgba(248, 1, 236, 0.2),
    0 -4px 13px rgba(152, 187, 245, 0.2);
  background: var(--card-bg-color);
}

.service-card i {
  font-size: 2rem;
  color: var(--primary-text-color);
  margin-bottom: 1rem;
}

.service {
  font-size: 1.375rem;
  margin-bottom: 0.875rem;
  color: var(--accent);
}

.service-description {
  font-size: 0.9875rem;
  opacity: 0.7;
}

/* Skills section */

#skills {
  padding: var(--section-padding);
}

.skills-subtitle {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--card-bg-color);
  border: var(--body-bg-color);
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

.skill-card:hover,
.service-card:hover {
  transform: translateY(-20px) scale(1.05) !important;
}

.skill-card img {
  margin-bottom: 1rem;
}

.skill {
  margin-bottom: 0.875rem;
  color: var(--accent);
}

.skill-description {
  font-size: 0.9875rem;
  opacity: 0.7;
}
/* Projects section */

#projects {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--section-padding);
}

.projects-subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  margin-bottom: 1.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding: var(--card-padding);
}

.project-card img {
  max-width: 70%;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0 auto;
}

.project-name {
  margin-bottom: 1rem;
  font-size: 1.375rem;
  color: var(--accent);
}

.project-name:hover {
  color: var(--primary-text-color);
}

.project-description {
  color: var(--primary-text-color);
  font-size: 0.9875rem;
  margin-bottom: 1rem;
  text-align: justify;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-tools span {
  padding: 0.3125rem 0.625rem;
  color: var(--primary-text-color);
  border: 1px solid var(--primary-text-color);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  transition: all 0.3s ease-in-out;
}

.project-tools span:hover {
  background: var(--card-bg-color);
  transform: translateY(-5px) scale(1.05);
  border: none;
}

.project-link-buttons {
  display: flex;
  gap: 1rem;
}

.project-link-buttons a {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 500;
  margin-top: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.3s ease-out,
    box-shadow 0.3s ease-out,
    transform 0.3s ease-out;
}

.project-link-buttons i {
  margin-right: 0.1875rem;
}

.live-link-btn {
  background-color: #0d1321;
  color: var(--secondary-text-color);
}

.github-link-btn {
  background-color: #d16748;
  color: #000;
}

.project-link-buttons a:hover {
  background-color: var(--primary-text-color);
  color: var(--card-bg-color);
  border: var(--body-bg-color);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.project-link-buttons a:active {
  transform: scale(0.97);
}

/* Contact section */

#contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--section-padding);
}

.contact-subtitle {
  font-size: 1.125rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.contact-card {
  background: var(--card-bg-color);
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  max-width: 37.5rem;
  width: 100%;
  margin: 0 auto;
}

.contact-card h3,
.contact-card h4 {
  font-weight: 600;
}

.contact-card h3 {
  margin-bottom: 2rem;
}

.contact-card h4 {
  margin: 2rem 0 0.5rem;
  font-size: 1.375rem;
}

.contact-card p {
  opacity: 0.8;
}

.contact-card h3,
.contact-card h4,
.contact-card p {
  color: var(--primary-text-color);
}

.social-links {
  list-style: none;
  padding: 0;
}

.social-links li {
  margin-bottom: 1rem;
  color: var(--primary-text-color);
}

.social-links li a {
  text-decoration: none;
  color: var(--primary-text-color);
}

.social-links li a:hover,
.footer-link:hover {
  text-decoration: underline;
}

.social-links i {
  margin-right: 0.625rem;
  font-size: 1.25rem;
  color: var(--accent);
}

#contact-form {
  max-width: 37.5rem;
  margin: 0 auto;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

#contact-form label {
  color: var(--primary-text-color);
  font-size: 1.125rem;
  font-weight: 500;
}

#contact-form input,
#contact-form textarea {
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  width: 100%;
  font-size: 0.9375rem;
  margin: 0.3125rem 0 0.625rem;
  background: var(--card-bg-color);
  color: var(--secondary-text-color);
  outline: none;
  box-shadow:
    0 4px 8px rgba(248, 1, 236, 0.2),
    0 -4px 8px rgba(152, 187, 245, 0.2);
}

#contact-form textarea {
  resize: vertical;
  min-height: 60px;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border: 2px solid var(--primary-text-color);
}

#contact-form button {
  border: var(--body-bg-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  margin-top: 0.75rem;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
  background-color: var(--primary-text-color);
  color: var(--card-bg-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.3s ease-out,
    box-shadow 0.3s ease-out,
    transform 0.3s ease-out;
}

#contact-form button:hover {
  background-color: var(--accent);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
}

#contact-form button:active {
  transform: scale(0.97);
}

/* Contact form success-message */
.thankyou-message {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid #4caf50;
  background-color: #274663;
  color: #d0f0c0;
  font-size: 0.95rem;
  border-radius: 6px;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.thankyou-message.show {
  opacity: 1;
}

/* Footer */

footer {
  padding: 2.5rem 1rem 1.25rem;
  background-color: #0d1321;
  text-align: center;
  color: var(--primary-text-color);
}

.copyright,
.copyright-text {
  font-size: 0.9rem;
  color: var(--primary-text-color);
  opacity: 0.8;
}

.myName {
  color: var(--accent);
  font-size: bold;
  font-size: 1rem;
}

.footer-links {
  color: var(--accent);
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 1.5rem;
  margin: 0.8rem auto;
  cursor: pointer;
}

.back-to-top-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  z-index: 1000;
  text-decoration: none;
  background: var(--card-bg-color);
  color: whitesmoke;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition:
    opacity 0.3s ease-out,
    transform 0.3s ease-out;
}

.back-to-top-btn:hover {
  opacity: 0.8;
}

.back-to-top-btn:active {
  transform: scale(0.97);
}
.footer-link {
  text-decoration: none;
  color: var(--accent);
}

/* RESPONSIVENESS */

/* Media queries */

@media (max-width: 767px) {
  h2 {
    font-size: 1.75rem;
  }

  #logo-text {
    font-size: 1.5rem;
  }

  .hamburger {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    height: 100vh;
    background-color: #0d1321;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    opacity: 0;
    text-align: center;
    padding: 7.5rem 0;
  }

  nav ul {
    flex-direction: column;
  }

  nav li {
    margin: 0.625rem 0;
  }

  /* Show menu when checkbox is checked */
  #menu-toggle:checked + .hamburger + nav {
    transform: translateX(0);
    opacity: 1;
  }

  /* Animate Hamburger icon */
  #menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 5px);
  }

  #menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -5px);
  }

  .page-content {
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .about-content {
    flex-direction: column-reverse;
  }

  .about-title {
    text-align: center;
  }

  .about-image-container {
    width: 250px;
    height: 250px;
  }

  .about-image {
    width: 250px;
    height: 250px;
  }

  .services-grid,
  .contact-info {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.875rem 0;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  h2 {
    font-size: 1.75rem;
  }

  #logo-text {
    font-size: 1.625rem;
  }

  .page-content {
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.0625rem;
  }

  .about-content {
    flex-direction: column-reverse;
  }

  .about-title {
    text-align: center;
  }

  .about-image-container {
    width: 250px;
    height: 250px;
  }

  .about-image {
    width: 250px;
    height: 250px;
  }

  .services-grid,
  .contact-info {
    grid-template-columns: 1fr;
  }

  .projects-subtitle {
    max-width: 37.5rem;
    margin-left: auto;
    margin-right: auto;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
