:root {
  /* Colors */

  --clr-bg-primary: hsl(54, 100%, 96%);
  --clr-violet: hsl(244, 47%, 89%);
  --clr-green: hsl(81, 78%, 87%);
  --clr-pink: hsl(0, 100%, 90%);
  --clr-brown: hsl(26, 39%, 39%);
  --clr-grey-500: hsl(0, 0%, 29%);
  --clr-grey-200: hsl(0, 0%, 88%);

  /* Typography */

  --ff-primary: "Plus Jakarta Sans", sans-serif;

  --fs-900: 3rem;
  --fs-800: clamp(1.8rem, 2vw + 1rem, 3.5rem);
  --fs-700: 2rem;
  --fs-600: 1.5rem;
  --fs-500: 1.25rem;
  --fs-400: 1rem;
  --fs-300: 0.87rem;
  --fs-200: 0.75rem;
}

@media (min-width: 768px) {
  :root {
    --fs-400: 1.5rem;
    --fs-500: 1.5rem;
    --fs-600: 2rem;
    --fs-700: 2.5rem;
    --fs-800: 3rem;
    --fs-900: 3.5rem;
  }
}

@media (min-width: 1024px) {
  /* :root {
  } */
}

/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Language Switcher */
.language-switcher {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  z-index: 9999;
}

.language-menu {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.language-menu li {
  margin: 0;
}

.language-icon {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  color: #666;
  opacity: 0.8;
  vertical-align: middle;
  line-height: 1.2;
}

.lang-link {
  display: block;
  padding: 0.25rem 0;
  text-decoration: none;
  color: #333;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-link:hover {
  color: #16c47f;
}

.lang-link.active {
  color: #333;
  opacity: 0.6;
  cursor: default;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .language-switcher {
    top: 0.75rem;
    right: 1rem;
  }

  .language-menu {
    gap: 0.5rem;
  }

  .language-icon {
    font-size: 0.75rem;
    padding: 0.2rem 0;
    vertical-align: baseline;
    line-height: 1;
    transform: translateY(-1px);
  }

  .lang-link {
    font-size: 0.75rem;
    padding: 0.2rem 0;
  }
}

/* Reset margins */
body,
h1,
h2,
h3,
h4,
h5,
p,
figure,
picture {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  font-weight: 400;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

html,
body {
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  height: 100vh;
  font-family: var(--ff-primary);
  background-color: var(--clr-bg-primary);
  flex-direction: column;
}

/* Utility classes */

.flex {
  display: flex;
  gap: var(--gap, 1rem);
}

.grid {
  display: grid;
  gap: var(--gap, 1rem);
}

.d-block {
  display: block;
}

.d-inline {
  display: inline;
}

.uppercase {
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Typography */

.letter-spacing-1 {
  letter-spacing: 4.75px;
}
.letter-spacing-2 {
  letter-spacing: 2.7px;
}
.letter-spacing-3 {
  letter-spacing: 2.35px;
}

/* Layout */

main {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 2.5rem;
  /* padding: clamp(1rem, 2vw + 1rem, 3rem); */
  padding-top: 0;
  padding-bottom: 4rem;
}

header {
  flex-direction: row;
  align-items: center;
  padding: clamp(1rem, 4vw + 1rem, 5rem);
  --gap: none;
}

.logo {
  width: clamp(8rem, 20vw, 17rem);
  height: auto;
}

.primary-navigation {
  display: flex;
  flex-direction: column;
  position: fixed;
  --gap: clamp(1.5rem, 2vw + 1rem, 3.5rem);
  align-items: start;
  z-index: 1000;
  inset: 0 0 0 30%;
  padding-left: 3rem;
  margin-top: 0;
  padding-top: 6rem;
  list-style: none;
  transform: translate(100%);
  transition: transform 500ms ease-in-out;
  background: var(--clr-green) / 0.05;
  backdrop-filter: blur(1rem);
}

.primary-navigation[data-visible="true"] {
  transform: translateX(0);
}

.logo-container {
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mobile-nav-toggle {
  display: block;
  margin-block: auto;
  /* position: fixed; */
  top: clamp(1rem, 4.3vw + 1.1rem, 5rem);
  right: clamp(1rem, 4.4vw + 1.1rem, 5rem);
  z-index: 2000;
  background: transparent;
  background-image: url(./images/menu\ icon\ open.svg);
  background-repeat: no-repeat;
  background-position: center;
  width: 2.5rem;
  aspect-ratio: 1;
  border: 0;
}

.mobile-nav-toggle[aria-expanded="true"] {
  background-image: url(./images/menu\ icon\ close.svg);
  position: fixed;
}

.mobile-nav-toggle:focus-visible {
  outline: 5px solid white;
  outline-offset: 5px;
}

.primary-navigation a {
  color: black;
  text-decoration: none;
  letter-spacing: 1.1px;
  font-weight: 500;
  font-size: var(--fs-400);
}

.primary-navigation a {
  overflow: hidden;
}

.primary-navigation a {
  border-radius: 5px;
}

.profile-image {
  width: 200px;
  border-radius: 100%;
}

h1 {
  text-align: center;
  padding-inline: 2rem;
  max-width: 20ch;
  margin-inline: auto;
  word-break: break-word;
  font-weight: 500;
  font-size: var(--fs-500);
}

/* Reduce h1 font size for Spanish to prevent text shifting */
html[lang="es"] h1 {
  font-size: var(--fs-400);
}

.job-title {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  margin-block: 1rem;
  min-width: 15ch;
  min-height: 2.4rem;
}

.cursor {
  display: inline-block;
  font-size: 1.5rem;
  color: black;

  font-weight: 200;
}

.about-container {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about-text {
  text-align: center;
  line-height: 0.8;
  font-size: var(--fs-400);
  max-width: 450px;
}

#awesome {
  font-family: "Give You Glory", cursive;
  font-size: var(--fs-500);
  padding-inline: 0.1rem;
}

#modern {
  font-family: "Patrick Hand SC", cursive;
  font-size: var(--fs-600);
}

#functional {
  font-family: "M PLUS 1p", sans-serif;
  font-size: var(--fs-500);
}

#text-span {
  line-height: 1.7;
}

/* ========= Projects Section ========= */

.projects {
  width: 100%;
  padding: 4rem 1rem;
  box-sizing: border-box;
}

.projects h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.projects-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 0.5rem;
}

.project-card {
  background: #4a4a4a;
  border-radius: 12px;
  box-shadow: 3px 8px 7px rgb(182, 182, 182);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s;
  padding: 1.5rem 1.2rem; /* Add horizontal padding */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.card-inner {
  width: 100%;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
}

.card-front,
.card-back {
  width: 100%;
  backface-visibility: hidden;
  overflow: hidden;
}

.card-front {
  position: relative;
  z-index: 3;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-back {
  display: none;
}

.project-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  aspect-ratio: 16/9;
  margin: 0 auto;
}

.project-title {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f0f0f0;
  border-bottom: 1px solid lightcyan;
  width: 100%;
  padding-bottom: 1rem;
}

.project-description {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* ========= Packages Section ========= */

.packages {
  flex-direction: column;
  padding-inline: 1rem;
}

.packages > h3 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.packages-offers {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.package-list {
  list-style: none;
  padding: 1.2em;
  margin: 1.2em auto;
  text-align: left;
  background: rgba(217, 239, 202, 0.7);
  border: 1.5px solid rgba(198, 127, 28, 0.25);
  border-radius: 12px;
  width: 280px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1.5px 4px rgba(0, 0, 0, 0.08);
}

.package-list li {
  position: relative;
  padding-left: 1.5em;
  list-style: none;
  margin-bottom: 0.7em;
}

.package-list li:last-child {
  margin-bottom: 0;
}

.package-list li::before {
  content: "✓";
  color: #111;
  position: absolute;
  left: 0;
  font-size: 1.1em;
  line-height: 1;
  top: 0.1em;
}

.packages-offers h4 {
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: none;
  position: relative;
  padding-bottom: 0.3em;
  margin-bottom: 0.8em;
}

.packages-offers h4::after {
  content: "";
  display: block;
  width: 40%;
  height: 1px;
  background: var(--clr-brown);
  margin: 0.4em auto 0 auto;
  border-radius: 1px;
}

.packages-offers p {
  font-size: 1rem;
  font-weight: 400;
}

.packages-offers .package-one p:last-of-type,
.packages-offers .package-two p:last-of-type,
.packages-offers .package-three p:last-of-type {
  margin-block: 1rem;
}

/* ========= Contact Section ========= */

.contact {
  flex-direction: column;
  margin-top: 1rem;
}

.solution-container {
  flex-direction: row;
  justify-content: center;
  --gap: 0.8rem;
}

.contact-paragraph {
  font-size: var(--fs-500);
}

.sparkle-icon {
  height: 24px;
}

.last-paragraph {
  text-align: center;
  margin-block: 0.5rem;
  margin-inline: 0.5rem;
  line-height: 1.4;
}

.contact-btn {
  cursor: pointer;
  width: 250px;
  place-self: center;
  margin-top: 1rem;
  padding-block: 1rem;
  border-radius: 15px;
  letter-spacing: 2px;
  font-weight: 500;
  font-size: var(--fs-500);
  border: 1px solid orangered;
  transition: 0.7s;
  background-size: 200% auto;
  box-shadow: 0 0 10px grey;
  background-image: linear-gradient(
    90deg,
    #f97533 0%,
    #fec988 47%,
    #f97533 100%
  );
  /* Explicit color rules for mobile browsers */
  color: black !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.contact-btn:hover {
  background-position: right center;
}

.contact-btn:focus {
  outline: 2px solid #007acc;
  outline-offset: 2px;
}

/* ========= Mobile Social Section ========= */

.mobile-social-section {
  margin-top: auto;
  margin-left: -3rem;
  margin-right: 0;
  padding: 1.2rem 3rem 1.5rem 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background-color: black;
  width: calc(100% + 3rem);
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.mobile-social-links {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  padding-right: 1rem;
  --gap: 1.5rem;
}

.social-link {
  color: black;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--fs-400);
  padding: 0.6rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ========= Footer ========= */

.footer-social {
  background: black;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer-content {
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  --gap: 1.5rem;
}

.footer-social-links {
  flex-direction: row;
  align-items: center;
  --gap: 1.5rem;
}

.footer-social-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-500);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.footer-social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer-text {
  text-align: center;
  color: white;
  font-size: var(--fs-300);
  margin: 0;
}

/* ========= Consultation Form Styling ========= */

.body-form {
  padding: clamp(1rem, 2vw + 1rem, 3rem);
}

.main-form {
  flex-direction: column;
  padding-top: 1rem;
  --gap: 3rem;
}

.main-form p {
  text-align: center;
  font-size: var(--fs-500);
}

/* Reduce form title/intro text size for Spanish */
html[lang="es"] .main-form p {
  font-size: var(--fs-400);
}

form {
  flex-direction: column;
  align-self: self-start;
  margin-top: 1rem;
  --gap: 2rem;
  width: 100%;
}

form input {
  margin-top: -1.7rem;
  height: clamp(3rem, 6vw + 1rem, 5rem);
  border-radius: 5px;
  border: 1px solid grey;
  padding: 0.5rem;
}

form input:focus,
form textarea:focus {
  outline: 2px solid #007acc;
  outline-offset: 2px;
  border-color: #007acc;
}

form input[aria-invalid="true"],
form textarea[aria-invalid="true"] {
  border-color: orangered;
  outline-color: orangered;
}

.error-email,
.error-name {
  color: orangered;
  margin-top: -1.5rem;
  text-align: left !important;
  display: none;
}

form textarea {
  border-radius: 5px;
  border: 1px solid grey;
  margin-top: -1.7rem;
  height: clamp(8rem, 20vw + 1rem, 15rem);
  padding: 0.5rem;
}

.request-btn {
  cursor: pointer;
  width: clamp(250px, 50vw, 400px);
  place-self: center;
  margin-top: 1rem;
  padding-block: 1rem;
  border-radius: 15px;
  font-weight: 400;
  font-size: var(--fs-500);
  border: none;
  background-color: #d2fba4;
  /* Explicit color rules for mobile browsers */
  color: black !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.request-btn:focus {
  outline: 2px solid #007acc;
  outline-offset: 2px;
}

.request-btn:hover {
  background-color: #c8f799;
  color: black !important;
}

/* ========= Success Message ========= */

.success-message {
  display: none;
  text-align: center;
  width: 100%;
  margin-top: 1rem;
  padding: 2rem;
  background: #d2fba4;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Mobile Browser Fixes
   =========================== */

/* iOS Safari and other mobile browsers often override button styles */
@supports (-webkit-touch-callout: none) {
  .contact-btn,
  .request-btn {
    color: black !important;
    -webkit-tap-highlight-color: transparent;
  }

  .contact-btn:active,
  .contact-btn:focus,
  .request-btn:active,
  .request-btn:focus {
    color: black !important;
  }
}

/* General mobile browser overrides */
@media (max-width: 767px) {
  .contact-btn,
  .request-btn {
    color: black !important;
    text-decoration: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .contact-btn:visited,
  .contact-btn:link,
  .contact-btn:active,
  .request-btn:visited,
  .request-btn:link,
  .request-btn:active {
    color: black !important;
  }
}

/* ===========================
   Media Query Section
   =========================== */

@media (max-width: 767px) {
  li a {
    display: inline-block;
    transform-style: preserve-3d;
  }

  li a:hover {
    animation: slide-fwd-center 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  li {
    perspective: 500px;
  }

  .slide-fwd-center {
    -webkit-animation: slide-fwd-center 0.45s
      cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation: slide-fwd-center 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  @-webkit-keyframes slide-fwd-center {
    0% {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
    100% {
      -webkit-transform: translateZ(160px);
      transform: translateZ(160px);
    }
  }

  @keyframes slide-fwd-center {
    0% {
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
    }
    100% {
      -webkit-transform: translateZ(160px);
      transform: translateZ(90px);
    }
  }
}

@media (min-width: 768px) {
  .primary-navigation {
    inset: 0 0 0 40%;
    padding-top: 9rem;
    padding-left: 5rem;
  }

  .mobile-social-section {
    margin-left: -5rem;
    padding: 1.2rem 5rem 1.5rem 5rem;
    width: calc(100% + 5rem);
  }

  h1 {
    letter-spacing: 0.5px;
  }

  /* Reduce h1 font size for Spanish on tablet screens */
  html[lang="es"] h1 {
    font-size: var(--fs-400);
  }

  .job-title .text,
  .job-title .cursor {
    line-height: clamp(2rem, 2vw, 2.5rem);
    vertical-align: middle;
  }

  .cursor {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    vertical-align: middle;
    line-height: 1;
  }

  #awesome {
    font-size: var(--fs-500);
    padding-inline: 0.1rem;
  }

  #modern {
    font-size: var(--fs-600);
  }

  #functional {
    font-size: var(--fs-500);
  }

  .about-container {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    --gap: 2rem;
  }

  .about-text {
    max-width: 400px;
    line-height: 1;
    font-size: var(--fs-400);
  }

  /* ========= Project Section ========= */

  .projects-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    max-width: 1100px;
    overflow-x: hidden;
    padding: 1rem;
  }

  .project-card {
    perspective: 1200px;
    padding: 2.5rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    display: block;
  }

  .project-card:hover .card-inner {
    transform: rotateY(180deg);
    transition-delay: 0.8s;
  }

  .project-card:focus-within .card-inner {
    transform: rotateY(180deg);
  }

  .card-front,
  .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid lightcyan;
  }

  .card-front {
    z-index: 3;
    background: #4a4a4a;
    justify-content: flex-start;
  }

  .card-front a {
    z-index: 10;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
  }

  .project-title {
    display: block;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #f0f0f0;
    border-bottom: none;
    width: auto;
    padding-bottom: none;
  }

  .project-description {
    display: none;
  }

  .card-back {
    background: #4a4a4a;
    transform: rotateY(180deg);
    z-index: 2;
    text-align: center;
  }

  .project-title-back {
    display: none;
  }

  .project-description-back {
    font-size: 1rem;
    line-height: 1.5;
    color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
  }

  .package-list {
    width: 350px;
  }

  /* ========= Footer Tablet+ ========= */

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    --gap: 1rem;
  }

  .footer-social {
    padding-bottom: 0.3rem;
  }

  .footer-social-links {
    order: 1;
    align-self: flex-end;
  }

  .footer-text {
    order: 2;
    align-self: flex-start;
    font-size: var(--fs-200);
  }

  /* ========= Form Section ========= */

  form {
    width: 70%;
    max-width: 600px;
    align-self: center;
  }

  .main-form p {
    max-width: 600px;
  }
}

@media (min-width: 1024px) {
  body {
    display: flex;
    flex-direction: column;
  }

  .primary-navigation {
    flex-direction: row;
    position: static;
    transform: none;
    backdrop-filter: none;
    inset: unset;
    padding-top: 0;
  }

  .primary-navigation a {
    position: relative;
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
  }

  .primary-navigation a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.9s ease;
  }

  .primary-navigation a:hover::after {
    transform: scaleX(1);
  }

  .mobile-nav-toggle {
    display: none;
  }

  /* Hide mobile social section on desktop */
  .mobile-social-section {
    display: none;
  }

  /* Bring footer social icons closer on desktop */
  .footer-social-links {
    --gap: 0.3rem;
  }

  main {
    flex: 1;
    padding-top: 2rem;
    justify-content: flex-start;
  }

  h1 {
    white-space: nowrap;
    max-width: unset;
    justify-content: center;
    margin-block: auto;
    font-size: var(--fs-700);
    padding-inline: 0;
  }

  /* Reduce h1 font size for Spanish on large screens */
  html[lang="es"] h1 {
    font-size: var(--fs-600);
  }

  .about-container {
    justify-content: center;
    --gap: clamp(4rem, 2vw, 5rem);
    margin-top: 5rem;
  }

  .about-text {
    font-size: var(--fs-600);
    max-width: 500px;
  }

  #awesome,
  #functional {
    font-size: var(--fs-600);
  }

  #modern {
    font-size: var(--fs-700);
  }

  .job-title {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    margin-block: 0;
    min-height: 2.4rem;
    vertical-align: middle;
    min-width: 16ch;
    padding-bottom: 0.5rem;
  }

  .job-title .text {
    min-height: 2.4rem;
    line-height: 2.4rem;
    display: inline-block;
    vertical-align: middle;
  }

  .job-title .text,
  .job-title .cursor {
    display: inline-block;
    vertical-align: middle;
    line-height: 2.4rem;
  }

  /* ========= Packages Section ========= */

  .packages-offers {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
    align-items: flex-start;
  }

  .packages-offers > div {
    flex: 1;
    max-width: 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    min-height: clamp(320px, 38vw, 420px);
    justify-content: flex-start;
    padding-bottom: 2rem;
  }

  .package-list {
    flex-grow: 1;
    width: 300px;
  }

  .package-price {
    margin-top: 1.2rem;
    font-weight: 500;
    font-size: 1.18rem;
  }

  .package-header {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
  }

  .packages-offers > div h4 {
    margin-top: 0;
    padding-top: 0;
  }

  .packages-offers p,
  .package-header p {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .package-header p {
    margin-top: 0;
  }

  .packages-offers p,
  .packages-offers ul {
    font-size: 1.1rem;
  }

  .packages-offers ul li {
    font-size: 1.18rem;
  }

  .packages-offers .package-list {
    min-height: 350px;
  }

  /* ========= Form Section ========= */

  .main-form {
    justify-content: center;
  }

  .main-form p {
    font-size: var(--fs-600);
  }

  /* Reduce form title/intro text size for Spanish on desktop */
  html[lang="es"] .main-form p {
    font-size: var(--fs-500);
  }

  .success-message {
    width: 60%;
    align-self: center;
  }

  /* ========= Footer Desktop ========= */

  .footer-social {
    padding: 2.5rem 2rem;
    padding-bottom: 0.5rem;
    padding-left: 0.2rem;
  }

  .footer-content {
    margin-inline: 0.1rem;
    justify-content: space-between;
    flex-direction: row;
    min-width: 100%;
  }

  .footer-social-links {
    order: 2;
    margin-bottom: 0.5rem;
  }

  .footer-text {
    order: 1;
    align-self: flex-end;
  }
}

@media (min-width: 1440px) {
  body {
    flex-direction: column;
  }

  .main-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1;
  }

  header {
    align-items: flex-start;
    flex-direction: column;
    width: clamp(
      20%,
      calc(30% - (10% * ((100vw - 1024px) / (1400px - 1024px)))),
      30%
    );
    height: 25%;
    padding-left: 2rem;
    padding-right: 0;
    padding-block: 3rem;
    --gap: 6rem;
    position: sticky;
    top: 0;
  }

  /* Give more space for languages with longer menu text */
  html[lang="es"] header {
    width: clamp(
      22%,
      calc(32% - (10% * ((100vw - 1024px) / (1400px - 1024px)))),
      32%
    );
    padding-left: 1rem;
  }

  main {
    padding-top: 8rem;
    flex: 1;
  }

  .logo {
    min-width: 100%;
    width: 100%;
    height: auto;
    display: block;
  }

  .logo-container {
    width: 100%;
    max-width: 250px;
    align-items: stretch;
  }

  .primary-navigation {
    position: static;
    flex-direction: column;
    transform: none;
    padding-left: 3rem;
    padding-right: 2rem;
    padding-top: 0;
    background: none;
    backdrop-filter: none;
    inset: unset;
    align-items: flex-end;
    margin-block: auto;

    border-right: 1px solid hsl(0, 0%, 0%, 0.2);
  }

  /* Adjust navigation padding for languages with longer menu text */
  html[lang="es"] .primary-navigation {
    padding-left: 1.5rem;
    padding-right: 1rem;
  }

  .primary-navigation li {
    text-align: center;
  }

  .primary-navigation a {
    font-size: var(--fs-500);
  }

  .contact-btn {
    margin-bottom: 5rem;
  }

  /* ========= Contact Section 1440px+ ========= */

  .contact {
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--clr-bg-primary);
  }

  .contact-paragraph {
    font-size: var(--fs-700);
  }

  .last-paragraph {
    font-size: var(--fs-600);
  }

  /* ========= Projects Section ========= */

  .projects-container {
    max-width: min(1200px, calc(70vw - 4rem));
  }

  .project-description-back {
    font-size: 1.15rem;
    line-height: 1.7;
  }

  .project-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 16/9;
    display: block;
    background: transparent;
    box-shadow: 0 4px 16px rgba(249, 247, 247, 0.1),
      0 1.5px 4px rgba(240, 238, 238, 0.08);
  }

  .project-image-portfolio {
    background: rgb(255, 247, 240);
  }

  .project-image-news {
    background: hsl(36, 100%, 99%);
  }

  .project-card a {
    border-radius: 6px;
    overflow: hidden;
    display: block;
    width: 100%;
  }

  /* ========= Packages Section ========= */

  .packages {
    margin-left: 0;
    overflow-x: hidden;
  }

  .packages-offers {
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
  }

  .packages-offers > div {
    max-width: 380px;
    min-height: 500px;
  }
  .package-list {
    width: 360px;
    min-height: 380px;
    padding: 1.6em 1.4em;
  }
  .packages-offers h4 {
    font-size: 1.7rem;
  }
  .packages-offers p,
  .packages-offers ul {
    font-size: 1.22rem;
  }
  .packages-offers ul li {
    font-size: 1.22rem;
  }
  .package-price {
    font-size: 1.28rem;
  }

  /* ========= Footer Large Desktop ========= */

  .footer-social {
    padding: 3rem 2rem;
    padding-left: 0.1rem;
    padding-bottom: 0.2rem;
  }

  .footer-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    --gap: 0;
    margin-inline: 0;
    min-width: 100%;
  }

  .footer-social-links {
    --gap: 2rem;
    order: 2;
    margin-bottom: 2rem;
  }

  .footer-text {
    order: 1;
    align-self: flex-end;
  }

  .footer-social-link {
    font-size: var(--fs-600);
    padding: 1rem 0.2rem;
  }

  .footer-social-link img {
    width: 32px;
    height: 32px;
  }

  /* ========= Form Section ========= */

  form label {
    font-size: var(--fs-500);
  }
}

/* ===========================
   Animations Section
   =========================== */

.cursor {
  animation: blinkCursor 1.2s steps(1) infinite;
}

@keyframes blinkCursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ===========================
   Extra Large Screens (1600px+)
   =========================== */

@media (min-width: 1600px) {
  .main-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1;
    align-items: flex-start;
  }

  header {
    margin-left: 4rem;
    width: clamp(
      20%,
      calc(30% - (10% * ((100vw - 1024px) / (1400px - 1024px)))),
      30%
    );
  }

  /* Give more space for languages with longer menu text on extra large screens */
  html[lang="es"] header {
    margin-left: 2rem;
    width: clamp(
      22%,
      calc(32% - (10% * ((100vw - 1024px) / (1400px - 1024px)))),
      32%
    );
  }

  main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .contact {
    width: 100%;
    margin-top: 2rem;
    padding: 4rem 2rem;
    align-self: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  /* ========= Projects Section 1600px+ ========= */

  .projects-container {
    gap: 3rem;
    max-width: 1300px;
  }

  .project-card {
    padding: 3rem 0 2.5rem 0;
  }
}
