/*=============== FONTS ===============*/
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/BaiJamjuree-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 101%;
}
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/BaiJamjuree-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 101%;
}
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/BaiJamjuree-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 101%;
}
@font-face {
  font-family: 'Bai Jamjuree';
  src: url('../fonts/BaiJamjuree-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 101%;
}


/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /* Color mode HSL(hue, saturation, lightness) */
  --first-color: hsl(14, 98%, 50%);
  --black-color: hsl(0, 0%, 0%);
  --black-color-light: hsl(0, 0%, 40%);
  --white-color: hsl(0, 0%, 95%);
  --title-color: hsl(0, 0%, 0%);
  --text-color: hsl(0, 0%, 35%);
  --text-color-light: hsl(0, 0%, 64%);
  --body-color: hsl(0, 0%, 87%);
  --container-color: hsl(0, 0%, 83%);

  /*========== Font and typography ==========*/
  /* .5rem = 8px | 1rem = 16px ... */
  --body-font: "Bai Jamjuree", sans-serif;
  --biggest-font-size: 2.5rem;
  --h1-font-size: 1.75rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
  --smaller-font-size: 0.75rem;


  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.5rem;
    --h1-font-size: 3rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}
/* Explicit heading sizes (avoid deprecated UA behavior) */
h1 { font-size: var(--h1-font-size); }
h2 { font-size: var(--h2-font-size); }
h3 { font-size: var(--h3-font-size); }
h4 { font-size: 1rem; }
h5 { font-size: var(--small-font-size); }
h6 { font-size: var(--smaller-font-size); }

/*=============== SELECTION ===============*/
::selection {
  background: hsl(14, 98%, 50%);
  color: #00369b;
}
::-moz-selection {
  background: hsl(14, 98%, 50%);
  color: #00369b;
}

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

html {
  scroll-behavior: smooth;
}

/* Minimal language switcher styling */
.lang-switch {
  display: inline-flex;
  gap: 0.5rem;
  margin-left: 0.75rem;
}

.lang {
  background: var(--body-color, #0f172a);
  border: 2px solid transparent;
  color: var(--title-color, #eaeaea);
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  font: 600 12px/1 system-ui;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.lang[aria-pressed="true"],
.lang.active {
  border-color: var(--first-color, #fe5f00);
  color: var(--first-color, #fe5f00);
}

/* Dark theme */
body.dark-theme .lang {
  background: var(--black-color, #0f172a);
  color: var(--white-color, #eaeaea);
}

body.dark-theme .lang[aria-pressed="true"],
body.dark-theme .lang.active {
  border-color: var(--first-color, #fe5f00);
  color: var(--first-color, #fe5f00);
}

.card {
  width: 300px;
  height: 220px;
  background-color: rgb(255, 255, 255);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  gap: 13px;
  position: relative;
  overflow: hidden;
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.062);
}

#cookieSvg {
  width: 50px;
}

#cookieSvg g path {
  fill: rgb(97, 81, 81);
}
/* Shake animation */
@keyframes shakeWithPause {
  0%, 100%   { transform: translateX(0) }

  /* Shake 1 */
  5%, 15%    { transform: translateX(-1px) }
  10%, 20%   { transform: translateX(1px) }

  /* Shake 2 */
  25%, 35%   { transform: translateX(-1px) }
  30%, 40%   { transform: translateX(1px) }

  /* Shake 3 */
  45%, 55%   { transform: translateX(-1px) }
  50%, 60%   { transform: translateX(1px) }

  /* Pause zone → hold still */
  61%, 99%   { transform: translateX(0) }
}

#cookie-consent.show #cookieSvg {
  animation: shakeWithPause 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  #cookie-consent.show #cookieSvg {
    animation: none;
  }
}


#cookie-consent { display: none; }

.cookieHeading {
  font-size: 1.2em;
  font-weight: 800;
  color: rgb(26, 26, 26);
}

.cookieDescription {
  text-align: center;
  font-size: 0.7em;
  font-weight: 600;
  color: rgb(99, 99, 99);
}

.buttonContainer {
  display: flex;
  gap: 10px;
  flex-direction: row;
}

.acceptButton {
  width: 80px;
  height: 30px;
  background-color: hsl(14, 98%, 50%);
  transition-duration: 0.2s;
  border: none;
  color: rgb(241, 241, 241);
  cursor: pointer;
  font-weight: 600;
  border-radius: 20px;
}

.declineButton {
  width: 80px;
  height: 30px;
  background-color: rgb(218, 218, 218);
  transition-duration: 0.2s;
  color: rgb(46, 46, 46);
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 20px;
}

.declineButton:hover {
  background-color: #ebebeb;
  transition-duration: 0.2s;
}

.acceptButton:hover {
  background-color: hsl(14, 98%, 40%);
  transition-duration: 0.2s;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color 0.4s; /* for dark mode */
}

h1,
h2,
h3,
h4 {
  color: var(--title-color);
  font-weight: var(--font-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

/*=============== THEME ===============*/
.nav__buttons {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.change-theme {
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
  transition: color 0.3s;
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --first-color: hsl(14, 80%, 50%);
  --black-color: hsl(0, 0%, 18%);
  --black-color-light: hsl(0, 0%, 30%);
  --title-color: hsl(0, 0%, 95%);
  --text-color: hsl(0, 0%, 70%);
  --body-color: hsl(0, 0%, 8%);
  --container-color: hsl(0, 0%, 12%);
}

/*========== Color changes in some parts of the website, in dark theme ==========*/
.nav__logo svg,
.nav__logo img {
  filter: none;
  transition: filter 0.3s;
}

body.dark-theme .nav__logo svg,
body.dark-theme .nav__logo img {
  filter: invert(1) brightness(1.2) contrast(1.1);
}

.dark-theme .shadow-header {
  box-shadow: 0 1px 12px hsla(0, 0%, 0%, 0.6);
}

.dark-theme .section__title-1::after,
.dark-theme .section__title-2::after {
  background-color: hsla(14, 70%, 50%, 0.2);
}

.dark-theme :is(.home__arrow, .home__line, .about__line) {
  filter: none;
}

.dark-theme .home__description b {
  background: linear-gradient(
    90deg,
    hsla(14, 80%, 50%, 0.3),
    hsla(14, 80%, 50%, 0)
  );
}

.dark-theme :is(.button__ghost, .services__icon i) {
  color: var(--white-color);
}

.dark-theme .projects__card:hover {
  background-color: var(--body-color);
}

.dark-theme :is(.contact__mail, .contact__input, .contact__label) {
  background-color: var(--container-color);
}

.dark-theme .footer {
  background-color: hsl(0, 0%, 4%);
}

.dark-theme::-webkit-scrollbar {
  background-color: hsl(0, 0%, 20%);
}
.dark-theme::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 30%);
}
.dark-theme::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 40%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 4rem 2rem;
}

.section__title-1,
.section__title-2 {
  position: relative;
  font-size: var(--h1-font-size);
  width: max-content;
  margin: 0.75rem auto 2rem;
}

.section__title-1 span,
.section__title-2 span {
  z-index: 5;
  position: relative;
}

.section__title-1::after,
.section__title-2::after {
  content: "";
  width: 40px;
  height: 28px;
  background-color: hsla(14, 98%, 50%, 0.2);
  position: absolute;
  top: -4px;
  right: -8px;
}

.section__title-2::after {
  top: initial;
  bottom: -4px;
}

.geometric-box {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--first-color);
  rotate: -30deg;
}

.geometric-box::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid var(--black-color);
  left: -5px;
  top: -5px;
}

.main {
  overflow: hidden; /* For animation ScrollReveal */
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
  transition: box-shadow 0.4s, background-color 0.4s;
}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: flex;
  column-gap: 0.5rem;
  align-items: center;
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
}

.nav__logo-circle,
.nav__toggle {
  width: 32px;
  height: 32px;
  background-color: var(--black-color);
  color: var(--white-color);
  display: grid;
  place-items: center;
}

.nav__logo-circle {
  border-radius: 50%;
}

.nav__toggle {
  font-size: 1.25rem;
  cursor: pointer;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    background-color: hsla(0, 0%, 0%, 0.75);
    width: 100%;
    padding-block: 1.8rem 5rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: top 0.4s;
  }
}

.nav__title,
.nav__name,
.nav__close {
  color: var(--white-color);
}

.nav__title {
  display: block;
  font-size: var(--smaller-font-size);
  font-weight: var(--font-semi-bold);
  margin-bottom: 3.5rem;
}

.nav__name {
  position: relative;
  width: max-content;
  margin: 0 auto 3rem;
  font-size: var(--h2-font-size);
}

.nav__name::after,
.nav__name::before {
  content: "";
  width: 40px;
  height: 1px;
  background-color: var(--text-color-light);
  position: absolute;
  top: 50%;
  left: -4rem;
}

.nav__name::before {
  left: initial;
  right: -4rem;
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
}

.nav__link {
  position: relative;
  color: var(--text-color-light);
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  transition: color 0.3s;
}

.nav__link::after {
  content: "";
  width: 0;
  height: 2px;
  background-color: var(--white-color);
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  transition: width 0.3s;
}

.nav__link:hover {
  color: var(--white-color);
}

.nav__link:hover::after {
  width: 25%;
}

.nav__close {
  position: absolute;
  font-size: 1.5rem;
  top: 1rem;
  right: 1.5rem;
  cursor: pointer;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Add shadow header */
.shadow-header {
  box-shadow: 0 1px 16px hsla(0, 0%, 0%, 0.12);
}

/* Active link */
.active-link {
  color: var(--white-color);
}
.active-link::after {
  width: 25%;
}

/*=============== HOME ===============*/
.home__container {
  padding-top: 2rem;
}

.home__name {
  font-size: var(--biggest-font-size);
  text-align: center;
}

.home__perfil {
  position: relative;
  justify-self: center;
}

.home__image {
  width: 220px;
}

.home__img {
  position: relative;
  z-index: 10;
}

.home__shadow {
  width: 100%;
  height: 100%;
  background-color: var(--container-color);
  position: absolute;
  bottom: -0.75rem;
  right: -0.75rem;
  border: 4px solid var(--black-color);
  z-index: 5;
  transition: background-color 0.4s; /* for dark mode */
}

.home__arrow,
.home__line {
  position: absolute;
  filter: invert(1);
  width: 50px;
  aspect-ratio: 1 / 1;  /* reserve height immediately */
  transition: filter 0.4s; /* for dark mode */
}

.home__arrow {
  left: 40%;
  aspect-ratio: 1 / 1;  /* reserve height immediately */
  bottom: -4rem;
}
/* Match your desktop override */
@media (min-width: 1150px) {
  .home__arrow { width: 80px; } /* aspect-ratio keeps it square */
}

.home__perfil .geometric-box {
  top: 2.5rem;
  left: -0.7rem;
  z-index: 10;
}

.home__social {
  height: max-content;
  position: absolute;
  left: -3rem;
  top: 0;
  bottom: 0;
  margin: auto 0;
  display: grid;
  row-gap: 1rem;
}

.home__social-link {
  background-color: var(--black-color-light);
  color: var(--white-color);
  font-size: 1.25rem;
  padding: 6px;
  display: grid;
  place-items: center;
  transition: background-color 0.3s;
}

.home__social-link:hover {
  background-color: var(--black-color);
}

.home__info {
  margin-top: 4rem;
}

.home__description {
  text-align: center;
  color: var(--title-color);
  margin-bottom: 1.5rem;
}

/* Inline highlight that breaks per line cleanly on iOS */
.home__description b{
  /* single-line underline-ish band */
  background:
    linear-gradient(transparent 60%, hsl(14 98% 50% / .30) 0 90%, transparent 0) 0 0 / 100% 100% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 .04em;      /* prevents clipping at edges */
}

/* iOS text zoom guard so offsets don’t drift */
html { -webkit-text-size-adjust: 100%; }

.home__scroll {
  display: block;
  width: max-content;
  margin: 0 auto;
}

.home__scroll-text {
  display: none;
}

.home__scroll-box {
  background-color: var(--black-color);
  color: var(--white-color);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.4s; /* for dark mode */
}

.home__scroll-box i {
  animation: scroll-down 3s infinite;
}

/* Animate scroll icon */
@keyframes scroll-down {
  0% {
    transform: translateY(-1rem);
    opacity: 0;
  }
  50% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

/*=============== BUTTON ===============*/
.button,
.button__ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 0.5rem;
}

.button {
  background-color: var(--black-color);
  padding: 1.1rem 1.5rem;
  color: var(--white-color);
  font-weight: var(--font-medium);
  transition: background-color 0.4s;
}

.button i {
  font-size: 1.25rem;
}

.button:hover {
  background-color: var(--first-color);
}

.button__ghost {
  border: 3px solid var(--black-color);
  color: var(--black-color);
  padding: 0.5rem;
  transition: border 0.4s, color 0.4s;
}

.button__ghost i {
  font-size: 1.25rem;
}

.button__ghost:hover {
  border: 3px solid var(--first-color);
}

/*=============== ABOUT ===============*/
.about {
  background-color: var(--container-color);
  transition: background-color 0.4s; /* for dark mode */
}
.about__shadow,
.about__line,
.about__box{
  pointer-events: none;
  z-index: 0;                 /* keep below real content */
}
/* Make space for the absolutely-positioned accents so Services never overlaps */
.about {
  position: relative;
  overflow: visible;                /* keep accents visible */
}

.about::after {
  content: "";
  display: block;
  height: 5rem;                     /* spacer for mobile/tablet */
}

@media (min-width: 768px) {
  .about::after { height: 10rem; }  /* medium screens */
}

@media (min-width: 1150px) {
  .about::after { height: 6rem; }  /* large desktops – matches tall shadow */
}

.about__img{ z-index: 1; }    /* already set; keep above accents */

.about__container {
  row-gap: 0;
}

.about__perfil {
  position: relative;
  justify-self: center;
  margin-block: 2.5rem 4.5rem;
}

.about__image {
  width: 220px;
}

.about__img {
  position: relative;
  border: 4px solid var(--white-color);
  z-index: 1;
}


.about__line,
.about__box {
  position: absolute;
}



.about__perfil .geometric-box {
  top: 1.5rem;
  right: -2.8rem;
}

/* Deduplicated & cleaned per request */
.about__line {
  right: -1.25rem;
  top: 6rem;
  width: 50px;
  filter: invert(50%) sepia(10%) saturate(100%) hue-rotate(10deg)
    brightness(120%);
  transition: filter 0.4s; /* for dark mode */
}

.about__box {
  width: 40px;
  height: 40px;
  background-color: var(--first-color);
  right: -0.5rem;
  bottom: 1.5rem;
}

.about__info {
  padding-left: 1.25rem;
}

.about__description {
  position: relative;
  color: var(--title-color);
  margin-bottom: 1.5rem;
}

.about__description::after {
  content: "";
  width: 20px;
  height: 1px;
  background-color: var(--title-color);
  position: absolute;
  left: -1.75rem;
  top: 0.5rem;
}

.about__list {
  list-style: square;
  color: var(--title-color);
  margin-bottom: 3rem;
}

.about__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 1rem;
}

/*=============== SERVICES ===============*/
.services__container {
  grid-template-columns: 250px;
  justify-content: center;
  row-gap: 2rem;
  padding-top: 1rem;
}

.services__card {
  position: relative;
}

.services__content {
  height: 100%;
  background-color: var(--body-color);
  border: 4px solid var(--black-color);
  padding: 6rem 1rem 3rem;
  z-index: 5;
  position: relative;
  transition: background-color 0.4s, border 0.4s; /* for dark mode */
}

.services__border {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid var(--first-color);
  top: 0;
  left: 0;
  transition: transform 0.4s;
}

.services__icon {
  position: relative;
  display: inline-block;
}

.services__icon i {
  font-size: 2rem;
  color: var(--black-color);
  position: relative;
  z-index: 5;
}

.services__box {
  position: absolute;
  width: 24px;
  height: 24px;
  background-color: var(--first-color);
  right: -2px;
  top: -2px;
}

.services__title {
  font-size: var(--h2-font-size);
  margin-bottom: 1.25rem;
}

.services__card:hover .services__border {
  transform: translate(0.75rem, 0.75rem);
}

/*=============== PROJECTS ===============*/
.projects {
  background-color: var(--container-color);
  transition: background-color 0.4s; /* for dark mode */
}

.projects__container {
  row-gap: 2rem;
}

.projects__card {
  padding: 1rem 1rem 2rem;
  transition: background-color 0.4s;
}

.projects__image {
  position: relative;
  margin-bottom: 0.75rem;
}

/* kill the old sepia stack */
.projects__img {
  filter: none !important;
}

/* wrapper */
.tile {
  position: relative;
  isolation: isolate; /* required for stable blending */
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
}

/* force brand hue */
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(14 98% 50%);
  mix-blend-mode: hue;
  pointer-events: none;
}

/* force strong saturation */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(14 98% 50%);
  mix-blend-mode: saturation;
  opacity: 0.9; /* adjust to taste: 0–1 */
  pointer-events: none;
  transition: opacity 0.3s;
}

/* remove blend effects on hover */
.projects__card:hover .tile::before,
.projects__card:hover .tile::after {
  opacity: 0;
}

.projects__button {
  position: absolute;
  right: 1rem;
  bottom: -1.5rem;
  padding: 1rem;
}

.projects__content {
  margin-bottom: 1.25rem;
}

.projects__subtitle {
  position: relative;
  display: inline-block;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
}

.projects__subtitle::after {
  content: "";
  width: 20px;
  height: 1px;
  background-color: var(--text-color);
  position: absolute;
  top: 50%;
  left: 0;
}

.projects__title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.75rem;
}

.projects__buttons {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.projects__link {
  display: flex;
  align-items: center;
  column-gap: 0.25rem;
  color: var(--text-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  transition: color 0.4s;
}

.projects__link i {
  font-size: 1rem;
  color: var(--title-color);
  transition: color 0.4s;
}

.projects__link:hover,
.projects__link:hover i {
  color: var(--first-color);
}

.projects__card:hover {
  background-color: var(--white-color);
}

/*=============== CONTACT ===============*/
.contact {
  padding-bottom: 0;
}

.contact__container {
  position: relative;
  grid-template-rows: 300px max-content max-content;
  row-gap: 0;
}

.contact__data {
  position: relative;
  width: 300px;
  height: 300px;
  background-color: var(--container-color);
  padding: 3rem 1.5rem 3.5rem;
  margin-left: auto;
  border-bottom: 4px solid var(--first-color);
  z-index: 5;
  transition: background-color 0.4s; /* for dark mode */
}

.contact__data .section__title-2 {
  margin: 0 0 1.5rem;
  transform: translateX(-3rem);
}

.contact__description-1 {
  color: var(--title-color);
  font-weight: var(--font-medium);
  margin-bottom: 2rem;
}

.contact__description-2 {
  color: var(--title-color);
  font-size: var(--small-font-size);
}

.contact__data .geometric-box {
  top: 2rem;
  right: 2.5rem;
}

.contact__mail {
  position: relative;
  background-color: var(--black-color);
  padding: 5rem 1.5rem 2.5rem;
  margin-top: -2.5rem;
  transition: background-color 0.4s; /* for dark mode */
}

.contact__title {
  color: var(--white-color);
  font-size: var(--h2-font-size);
  margin-bottom: 2rem;
  text-align: center;
}

.contact__form,
.contact__group {
  display: grid;
  row-gap: 1.25rem;
}

.contact__form {
  position: relative;
}

.contact__box {
  position: relative;
  width: 100%;
  height: 58px;
}

.contact__input,
.contact__button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  outline: none;
  border: none;
}

.contact__input {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--black-color);
  border: 3px solid var(--black-color-light);
  color: var(--white-color);
  padding: 0.5rem 1rem;
  font-weight: var(--font-medium);
  transition: border 0.4s, background-color 0.4s;
}

.contact__input::placeholder {
  color: var(--text-color-light);
  transition: opacity 0.4s;
}

.contact__input:focus {
  border: 3px solid var(--white-color);
}

.contact__input:-webkit-autofill {
  transition: background-color 6000s, color 6000s;
}

.contact__label {
  position: absolute;
  top: 8px;
  left: 10px;
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  background-color: var(--black-color);
  padding: 8px;
  pointer-events: none;
  transition: top 0.4s, opacity 0.4s, background-color 0.4s;
  opacity: 0;
}

.contact__form .contact__area {
  height: 10rem;
}

.contact__area textarea {
  resize: none;
  padding-top: 1rem;
}

.contact__button {
  background-color: var(--first-color);
  cursor: pointer;
}

/* Opaque placeholder */
.contact__input:focus::placeholder {
  opacity: 0;
}

/* Move label up & sticky label */
.contact__input:focus + .contact__label,
.contact__input:not(:placeholder-shown).contact__input:not(:focus) + .contact__label {
  opacity: 1;
  top: -16px;
}

.contact__social {
  display: grid;
  row-gap: 1rem;
  background-color: hsl(0, 0%, 10%);
  padding-block: 1rem 2rem;
  text-align: center;
}

.contact__social-arrow {
  width: 32px;
  margin: 0 auto;
}

.contact__social-data {
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
}

.contact__social-description-1 {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  margin-bottom: 0.5rem;
}

.contact__social-description-2 {
  color: var(--white-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
}

.contact__message {
  color: var(--white-color);
  font-size: var(--small-font-size);
  position: absolute;
  bottom: -1.6rem;
  left: 0;
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--black-color);
}

.footer__container {
  padding-block: 1.5rem 1rem;
  row-gap: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__links {
  display: flex;
  column-gap: 2rem;
  margin-right: 10%; /* push links in from the right */
}


.footer__link {
  color: var(--white-color);
  transition: color 0.4s;
  text-underline-offset: 2px;        /* optional */
}


.footer__link:hover {
  color: var(--text-color-light);
}

.footer__copy {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  text-align: left;
}

.footer__copy a {
  color: var(--white-color);
  font-weight: var(--font-medium);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: 0.6rem;
  border-radius: 0.5rem;
  background-color: hsl(0, 0%, 65%);
}
::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 55%);
  border-radius: 0.5rem;
}
::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 45%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background: var(--black-color);
  display: inline-flex;
  padding: 8px;
  font-size: 1.25rem;
  color: var(--white-color);
  z-index: var(--z-tooltip);
  transition: bottom 0.4s, transform 0.4s, background-color 0.4s;
}

.scrollup:hover {
  transform: translateY(-0.5rem);
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .home__image {
    width: 180px;
  }

  .about__image {
    width: 180px;
  }

  .contact__data {
    width: 100%;
  }

  .contact__data .section__title-2 {
    transform: translateX(0);
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .home__container,
  .about__container,
  .projects__container {
    grid-template-columns: 350px;
    justify-content: center;
  }

  .contact__data {
    width: 350px;
    padding: 4rem 1.5rem;
    margin-inline: auto;
  }

  .contact__container {
    grid-template-columns: 500px;
    justify-content: center;
  }

  .contact__group {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
  }

  .contact__social {
    background-color: transparent;
  }

  .contact__social-arrow {
    filter: invert(1);
  }

  .contact__social-description-1 {
    color: var(--text-color);
  }

  .contact__social-description-2 {
    color: var(--title-color);
  }

  .dark-theme .contact__social-arrow {
    filter: none;
  }
}

@media screen and (min-width: 768px) {
  .services__container {
    grid-template-columns: repeat(2, 250px);
  }

  .projects__container {
    grid-template-columns: repeat(2, 350px);
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .section__title-1::after,
  .section__title-2::after {
    width: 70px;
    height: 48px;
  }

  .geometric-box {
    transform: scale(1.2);
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    column-gap: 4rem;
  }

  .nav__close,
  .nav__toggle,
  .nav__title,
  .nav__name {
    display: none;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
  }

  .nav__menu {
    margin-left: auto;
  }

  .nav__link {
    color: var(--text-color);
    font-size: var(--normal-font-size);
  }

  .nav__link:hover {
    color: var(--title-color);
  }

  .nav__link::after {
    background-color: var(--title-color);
  }

  .active-link {
    color: var(--title-color);
  }

  .nav__link-button {
    background-color: var(--black-color);
    color: var(--white-color);
    padding: 1.1rem 1.5rem;
  }

  .nav__link-button:hover {
    color: var(--white-color);
  }

  .nav__link-button::after {
    background-color: transparent;
  }

  .change-theme {
    color: var(--text-color);
  }

  .change-theme:hover {
    color: var(--title-color);
  }

  .home__container {
    grid-template-columns: repeat(2, 460px);
    gap: 2rem 4rem;
    align-items: center;
    padding-block: 5.5rem;
  }

  .home__perfil {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .home__image {
    width: 350px;
  }

  .home__shadow {
    right: -1.25rem;
    bottom: -1.25rem;
    border: 6px solid var(--black-color);
  }

  .home__name,
  .home__description {
    text-align: initial;
  }

  .home__name {
    align-self: flex-end;
  }

  .home__info {
    margin-top: 0;
    align-self: flex-start;
  }

  .home__description {
    position: relative;
    font-size: var(--h2-font-size);
    margin-bottom: 5.5rem;
    padding-left: 3rem;
  }

  .home__description::after {
    content: "";
    width: 32px;
    height: 2px;
    background-color: var(--title-color);
    position: absolute;
    left: 0;
    top: 14px;
  }

  .home__scroll {
    margin: 0;
    display: flex;
    align-items: center;
    column-gap: 0.75rem;
  }

  .home__scroll-text {
    display: block;
    color: var(--text-color);
    font-size: var(--smaller-font-size);
    font-weight: var(--font-medium);
  }

  .home__scroll-box {
    width: 44px;
    height: 44px;
  }

  .home__scroll-box i {
    font-size: 1.25rem;
  }

  .home__perfil .geometric-box {
    top: 15rem;
  }

  .home__arrow {
    top: 4.5rem;
    left: -8rem;
    rotate: 80deg;
    width: 80px;
  }

  .home__line {
    left: -15rem;
    bottom: 4rem;
    width: 80px;
    rotate: 30deg;
  }

  .home__social {
    left: initial;
    right: -6rem;
  }

  .home__social-link {
    font-size: 1.5rem;
    padding: 0.5rem;
  }

  .about__container {
    grid-template-columns: 440px 525px;
    gap: 1rem 9rem;
    align-items: center;
    padding-block: 1rem;
  }

  .about__perfil {
    order: -1;
    grid-row: 1 / 3;
  }

  .about__image {
    width: 350px;
  }

  .about__img {
    border: 8px solid var(--white-color);
  }

 
  .about__perfil .geometric-box {
    right: -4rem;
    top: 4.5rem;
  }

  .about__line {
    width: 80px;
    right: -2rem;
    top: 10rem;
  }

  .about__box {
    width: 64px;
    height: 64px;
    right: -0.75rem;
  }

  .about__container .section__title-1 {
    align-self: flex-end;
    margin-inline: 0;
  }

  .about__info {
    align-self: flex-start;
    padding-left: 3rem;
  }

  .about__description {
    font-size: var(--h2-font-size);
    margin-bottom: 2rem;
  }

  .about__description::after {
    width: 32px;
    height: 2px;
    left: -3rem;
    top: 14px;
  }

  .about__list {
    margin-bottom: 5rem;
  }

  .about__buttons {
    justify-content: initial;
  }

  .button__ghost {
    padding: 0.75rem;
  }

  .button__ghost i {
    font-size: 1.5rem;
  }

  .services__container {
    grid-template-columns: repeat(3, 282px);
    column-gap: 5rem;
    padding-block: 3rem 5rem;
  }

  .services__content {
    padding: 6.5rem 1.5rem 3.5rem;
    border: 6px solid var(--black-color);
  }

  .services__icon i {
    font-size: 3rem;
  }

  .services__box {
    width: 32px;
    height: 32px;
  }

  .services__title {
    margin-bottom: 1.5rem;
  }

  .services__card:hover .services__border {
    transform: translate(1.25rem, 1.25rem);
  }

  .projects__container {
    grid-template-columns: repeat(3, 352px);
    padding-block: 3rem 1rem;
  }

  .projects__card {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  .projects__image {
    margin-bottom: 1rem;
  }

  .projects__content {
    margin-bottom: 2rem;
  }

  .projects__button {
    right: 1.25rem;
  }

  .contact__container {
    grid-template-columns: 440px 670px;
    grid-template-rows: initial;
    padding-bottom: 2rem;
  }

  .contact__mail {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    padding: 7rem 5.5rem 6rem 7.5rem;
    margin-top: 0;
  }

  .contact__title {
    font-size: var(--h3-font-size);
    text-align: initial;
  }

  .contact__box {
    height: 60px;
  }

  .contact__form .contact__area {
    height: 11rem;
  }

  .contact__button {
    margin-top: 1.25rem;
    width: max-content;
  }

  .contact__data {
    width: 392px;
    height: 375px;
    padding: 4.5rem 3.5rem 3.5rem;
    margin: 7.5rem 0 0 8rem;
    border-bottom: 6px solid var(--first-color);
  }

  .contact__data .section__title-2 {
    margin: 0 0 2rem;
    transform: translateX(-6.5rem);
  }

  .contact__social {
    margin-left: 8rem;
    text-align: initial;
  }

  .contact__social-data {
    flex-direction: row;
    align-items: center;
    column-gap: 1.25rem;
  }

  .contact__social-arrow {
    width: 40px;
  }

  .contact__message {
    bottom: -2.5rem;
  }

  .dark-theme .contact__data {
    box-shadow: 4px 0 8px hsla(0, 0%, 4%, 0.3);
  }

  .footer__container {
    padding-block: 2rem;
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }

  .footer__links {
    column-gap: 3rem;
    order: 1;
  }

  .scrollup {
    right: 3rem;
  }
}

/* ======================= Cookie Consent + Modals ======================= */

/* Overlay for the cookie banner */
.cookie-consent {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.45);
}
.cookie-consent.show { display: flex; }

/* (Only used if you bring back grouped toggles) */
.cookie-groups {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 6px 0 4px;
  border: 0;
  padding: 0;
}
.cookie-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8em;
  color: #333;
  user-select: none;
}

/* =============================== Privacy modal =============================== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100000; /* above everything */
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.modal[aria-hidden="false"] { display: flex; }

.modal__card {
  width: min(680px, calc(100% - 2rem));
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  background: var(--white-color);
  color: var(--black-color);
  line-height: 1.6;

  /* Scroll safety on small viewports */
  max-height: min(80vh, 720px);
  overflow: auto;
}

/* Dark theme harmony */
.dark-theme .modal__card {
  background: var(--container-color);
  color: var(--title-color);
}

/* Heading & content polish */
.modal__card h2 {
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--first-color); /* single orange accent */
}
.modal__card p { max-width: 80ch; }

/* Section labels: neutral color + tiny orange dot accent */
.modal__card strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--title-color);
  font-weight: 600;
}
.modal__card strong::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--first-color);
}
.modal__card strong::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--first-color);
}

.modal__card a {
  color: var(--first-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Actions row */
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}
.modal__actions .acceptButton {
  background: var(--first-color);
  color: #fff;
}
.modal,
.modal__card {
  overscroll-behavior: contain; /* prevent scroll chaining */
}

.modal__actions .declineButton {
  background: var(--black-color);
  color: var(--white-color);
}
/* Language switch container */
.lang-switch {
  display: flex;
  gap: .5rem;
  align-items: center;
}

/* Language buttons */
.lang-switch .lang {
  line-height: 1;        /* prevent tall text */
  padding: .4rem .65rem; /* add more breathing room */
  min-height: 1.8rem;    /* ensure full glyph fits */
  display: inline-flex;  /* align text properly */
  align-items: center;   /* center vertically */
  justify-content: center;
  font: 600 13px/1 system-ui;
  user-select: none;
  -webkit-user-select: none;
}


/* Active/selected language */
.lang-switch .lang.active,
.lang-switch .lang[aria-pressed="true"] {
  border-color: var(--first-color); /* orange border */
  color: var(--first-color);
}

/* Hover */
.lang-switch .lang:hover {
  border-color: var(--first-color);
}

/* Dark theme */
body.dark-theme .lang-switch .lang {
  background-color: var(--black-color);
  color: var(--white-color);
}

body.dark-theme .lang-switch .lang.active,
body.dark-theme .lang-switch .lang[aria-pressed="true"] {
  border-color: var(--first-color);
  color: var(--first-color);
}
.lang-switch .lang {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-tap-highlight-color: transparent; /* removes highlight on mobile */
}

/* Button hover states */
.modal__card .acceptButton,
.modal__card .declineButton {
  transition: background-color .25s, color .25s;
}
.modal__card .acceptButton:hover { background-color: hsl(14, 98%, 42%); }
.modal__card .declineButton:hover { background-color: hsl(0, 0%, 61%); }

/* Accessible focus ring */
.modal__card :focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle open animation (respect reduced motion) */
@keyframes modal-pop {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1);  }
}
.modal[aria-hidden="false"] .modal__card { animation: modal-pop .24s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .modal[aria-hidden="false"] .modal__card { animation: none; }
}

/* ======================== mobile clean-up ======================== */
@media (max-width: 640px) {
  .footer__links { display: none; }
  .footer {padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));}
  .footer__container { row-gap: .75rem; padding-block: 1rem .75rem; }
  .footer__copy { text-align: left; line-height: 1.4; display: block; }
  .footer__copy .footer__link { display: inline-block; margin-top: .25rem; }
}

/* === ABOUT shadow: single source of truth === */
.about__perfil,
.about__image { position: relative; }

.about__shadow {
  position: absolute;
  width:150px;
  height:385px;
  background-color: var(--body-color);
  right:-3.5rem;
  top:-2.5rem; /* desktop default */
  border-bottom:4px solid var(--first-color);
  transition: background-color .4s;
  z-index:0;
}

@media (max-width:768px){
  .about__shadow{
    top:2rem;
    right:-3.5rem;
    height:360px;
  }
}

@media (max-width:340px){
  .about__shadow{
    top:1.75rem;
    right:2.5rem;
    height:330px;
  }
}

@media (min-width:1150px){
  .about__shadow{
    width:240px;
    height:615px;
    top:-4rem;
    right:-5.5rem;
    border-bottom:6px solid var(--first-color);
  }
}
