/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Caveat:wght@400..700&family=Kalam:wght@300;400;700&family=Patrick+Hand&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: rgb(184, 92, 49);
  --title-color: hsl(228, 8%, 98%);
  --text-color: hsl(228, 8%, 70%);
  --white-color: hsl(228, 8%, 98%);
  --black-color: hsl(228, 6%, 4%);
  --body-color: rgb(19, 20, 13);
  --container-color: rgb(29, 29, 32);
  --shadow-img: 0 0 48px rgba(191, 80, 49, 0.4);
  --gallery-img: 0 0 20px rgba(191, 80, 49, 0.4);
  --button-img: 0 0 20px rgba(191, 80, 49, 15);
  --gradient-card: linear-gradient(180deg,
      hsla(93, 8%, 8%),
      rgb(184, 92, 49));

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Kalam", cursive;
  --biggest-font-size: 2.25rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;

  /*========== Font weight ==========*/
  --font-italice: 200;
  --font-regular: 400;
  --font-semi-bold: 600;
  --font-bold: 700;

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

span {
  font-family: "Kalam", cursive;
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

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


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

.section {
  padding-block: 5rem 3rem;
}

.section-title {
  font-size: var(--h1-font-size);
  font-weight: var(--font-bold);
  text-align: center;
  margin-bottom: 1rem;
}

.section-title span {
  color: var(--first-color);
}

.main {
  overflow: hidden;
}

/*=============== BUTTONS ===============*/

/* SLIDE BUTTON */
.slide-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem .75rem .85rem;
  color: var(--white-color);
  font-size: var(--h3-font-size);
  text-decoration: none;
  line-height: 1;
  border-radius: 16rem;
  isolation: isolate;
  cursor: pointer;
}

.slide-btn img,
.slide-btn span {
  z-index: 1;
}

.slide-btn img {
  width: 3.5rem;
  height: 3.5rem;
  line-height: 1;
}

.slide-btn::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  transform: translateY(-50%);
  background: var(--first-color);
  border-radius: 50%;
  z-index: 0;
  transition: width .8s cubic-bezier(.2, .7, .2, 1),
    border-radius .8s cubic-bezier(.2, .7, .2, 1);
}

.slide-btn:hover::before,
.slide-btn:focus-visible::before {
  width: calc(100% - 1rem);
  border-radius: 16rem;
}

.slide-btn.active::before {
  width: calc(100% - 1rem);
  border-radius: 16rem;
}

/* POP BUTTON */
.pop-btn {
  margin: 1.25rem auto 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  color: var(--white-color);
  background: none;
  border: none;
  padding: .75rem 1rem;
  border-radius: 18px;
  position: relative;
  isolation: isolate;
  text-decoration: none;
  cursor: pointer;
}

/* icon stack */
.pop-icon {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
}

/* orange circle behind icon */
.pop-icon::before {
  content: "";
  position: absolute;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--first-color);
  z-index: -1;
  transform: scale(1);
  transition: transform .35s ease;
  will-change: transform;
}

.pop-label {
  font-size: var(--h3-font-size);
}

/* hover/focus expansion */
.pop-btn:hover .pop-icon::before,
.pop-btn:focus-visible .pop-icon::before {
  transform: scale(1.55);
}




/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom,
      rgba(19, 20, 13, 1) 0%,
      rgba(19, 20, 13, 1) 40%,
      rgba(19, 20, 13, 0.8) 60%,
      rgba(19, 20, 13, 0) 100%);
  z-index: var(--z-fixed);
}

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

.nav-logo,
.nav-close,
.nav-toggle,
.nav-actions {
  display: flex;
  color: var(--title-color);
  cursor: pointer;
}

.nav-logo {
  column-gap: .25rem;
  align-items: center;
  font-size: 1.25rem;
  position: relative;
}

.logo-drop {
  position: absolute;
  width: 3rem;
  height: 5.5rem;
  background: var(--first-color);
  border-radius: 0 0 16rem 16rem;
  display: flex;
  align-items: end;
  justify-content: center;
  transform: translateY(-0.5rem);
  will-change: transform;
}



.nav-logo img {
  width: 2rem;
  height: 2rem;
  transform: translateY(-1rem);
}

.nav-actions {
  font-size: 2.25rem;
  column-gap: 5rem;
  align-items: center;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: hsla(228, 24%, 6%, .2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 80%;
    height: 100%;
    padding: 6rem 3rem 0;
    transition: right .4s;
  }
}

.nav-list {
  display: flex;
  flex-direction: column;
  row-gap: 3rem;
}

.nav-link {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  transition: color .4s;
}

.nav-link:hover {
  color: var(--first-color);
  filter: drop-shadow(var(--button-img));
}

.nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.25rem;
}

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

/* Add blur header */
.blur-header::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(19, 20, 13, 1), rgba(19, 20, 13, 0));
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;

  mask-image: linear-gradient(to bottom, rgba(19, 20, 13, 1), rgba(19, 20, 13, 0));
  mask-repeat: no-repeat;
  mask-size: cover;

  top: 0;
  left: 0;
  z-index: -1;
}

/* Active link */
.active-link {
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home,
.about,
.contact {
  position: relative;
  min-height: 100vh;
  overflow: hidden;

  background-image:
    linear-gradient(to top, rgba(19, 20, 13, 1), rgba(19, 20, 13, 0)),
    url("../img/background.png");

  background-size: 100% 50%, cover;
  background-position: bottom center, center;
  background-repeat: no-repeat, no-repeat;
}

.home-img,
.me-img {
  position: absolute;
  display: block;
  height: auto;
  filter: drop-shadow(var(--shadow-img));
}

.home-img {
  z-index: 1;
  width: clamp(120px, 80vw, 1100px);
  left: 50%;
  top: 24vh;
  transform: translateX(-50%);
  pointer-events: none;
}

.me-img {
  z-index: 2;
  width: clamp(120px, 30vw, 600px);
  left: 70%;
  top: 52vh;
  transform: translate(-50%, -50%);
  pointer-events: auto !important;
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer;
  content: url("../img/portfolio/default-me.png");
}

.me-img:hover,
.me-img:focus {
  content: url("../img/portfolio/hover-me.png");
}

/*=============== MAIN ===============*/
.portfolio-filters {
  padding-bottom: 2rem;
}

.filterable-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 48px;
  align-items: start;
}

/* Card */
.filterable-cards .card {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 3px solid var(--first-color);
  filter: drop-shadow(var(--gallery-img));
}

/* Image */
.filterable-cards .card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  transform: translateZ(0);
  z-index: 0;
}

.filterable-cards .card:hover,
.filterable-cards .card:focus-within {
  cursor: pointer;
}

/* Bottom panel (card-body) */
.filterable-cards .card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 20px 12px;
  display: grid;
  gap: 8px;
  background: var(--first-color);
  z-index: 2;
  isolation: isolate;
}

.filterable-cards .card-body::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 1000px;
  background: linear-gradient(to top, rgba(184, 92, 49, 1) 0%, rgba(184, 92, 49, .50) 5%, rgba(184, 92, 49, 0) 10%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: -1;
}

/* Show gradient on card hover/focus */
.filterable-cards .card:hover .card-body::before,
.filterable-cards .card:focus-within .card-body::before {
  opacity: 1;
}

/* Title */
.filterable-cards .card-title {
  margin: 0;
  color: var(--white-color);
  font-size: var(--h3-font-size);
}

/*=============== ABOUT ===============*/
.about {
  display: grid;
  place-items: center;
}

.about-me {
  row-gap: 2rem;
}

/* left column: picture and CV button */
.about-picture {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  justify-self: center;
  margin-inline: auto;
}

.about-img {
  width: 270px;
  filter: drop-shadow(var(--shadow-img));
  justify-self: center;
  height: auto;
  border: 5px solid var(--first-color);
  border-radius: 16rem;
}

#download-cv {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}


/* right column: text */
.about-title {
  font-size: var(--h2-font-size);
  margin-bottom: 0.5rem;
  color: var(--first-color);
  text-align: center;
}

.about-text {
  display: grid;
  row-gap: 1rem;
  width: 100%;
  font-size: var(--h3-font-size);
  font-weight: var(--font-italice);
  color: var(--white-color);
  text-align: center;
}

.about-text span {
  font-weight: var(--font-bold);
}

.accent {
  color: var(--first-color);
}

/*Interests and professional traits*/
.interests-container {
  padding-top: 2rem;
  padding-bottom: 2rem;
  row-gap: 2rem;
}

.interests-title {
  font-size: var(--h2-font-size);
  margin-bottom: 0.5rem;
}


.interests-list {
  display: grid;
  row-gap: 1rem;
}

.interests-item {
  display: flex;
  column-gap: .5rem;
  align-items: flex-start;
}

.interests-item img {
  width: 1.5rem;
  height: 1.5rem;
}

.interests-item p {
  font-size: var(--h3-font-size);
  color: var(--white-color);
  font-weight: var(--font-italice);
}

.interests-item p span {
  font-weight: var(--font-bold);
}

/*Pictures*/
.picture-gallery {
  align-items: center;
  justify-content: center;
}

.picture-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1360px;
  margin-inline: 1.5rem;
}

.picture-container .picture-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0rem;
  display: block;
}

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

/*=============== CONTACT ===============*/

/* Layout / container */
.contact-container {
  padding-top: 2rem;
  row-gap: 2rem;
}

.contact-description {
  font-size: var(--h3-font-size);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--white-color);
  font-weight: var(--font-italice);
}

/* Form base */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 28rem;
  margin-inline: auto;
  background: transparent;
  z-index: 1;
}

/* Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  position: relative;
}

.field--textarea .form-input {
  min-height: 8rem;
  resize: none;
}

/* Inputs */
.form-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-radius: .5rem;
  border: 1px solid var(--white-color);
  background: var(--body-color);
  color: var(--white-color);
  outline: none;
  padding: .625rem 1rem;
  font-size: var(--normal-font-size);
  font: var(--body-font);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, .6);
}

.form-input:focus {
  border-color: var(--first-color);
}

/* Error styling */
.error-txt {
  display: none;
  font-size: .8rem;
  margin-top: .25rem;
  line-height: 1.1;
  color: #b01414;
}

.field.error .error-txt {
  display: block;
}

.field.error .form-input {
  border-color: #b01414;
}

/* Visual vignette */
.contact {
  position: relative;
  z-index: 0;
}

.contact::after {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(16px);
  background: radial-gradient(circle,
      rgba(19, 20, 13, 1) 0 200px,
      rgba(19, 20, 13, 0) 400px);
}

.contact>* {
  position: relative;
  z-index: 1;
}

/* Success overlay (full-screen, transparent/frosted) */
#contact-success {
  position: fixed;
  inset: 0;
  display: none;
  /* toggled by JS (add .open) */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px) saturate(1.05);
}

/* Inner frosted card */
#contact-success .success-card {
  width: min(520px, 92%);
  max-width: 560px;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.6);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--white-color, #fff);
  text-align: center;
  transform: translateY(-6px);
  transition: transform .22s ease, opacity .18s ease;
  opacity: 0;
  will-change: transform, opacity;
}

/* Visible state */
#contact-success.open {
  display: flex;
}

#contact-success.open .success-card {
  transform: translateY(0);
  opacity: 1;
}

/* Typography & button inside overlay */
#contact-success .success-card h3 {
  margin: 0 0 .5rem;
  font-size: var(--h1-font-size);
  color: var(--first-color);
}

#contact-success .success-card p {
  margin: 0 0 1rem;
  color: var(--white-color);
}

#contact-success .pop-btn {
  background: transparent;
  border: 1px solid var(--body-color);
  color: var(--white-color);
  padding: .5rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--body-font);
}

#contact-success .pop-btn:hover {
  background: rgba(255, 255, 255, 0.02);
}

#contact-success .pop-btn:focus {
  outline: 2px solid var(--first-color);
  outline-offset: 3px;
}

/* Ensure overlay is keyboard-focusable when not hidden */
#contact-success[aria-hidden="false"] {
  display: flex;
}



/*=============== FOOTER ===============*/
.footer {
  display: grid;
  place-items: center;
  padding-block: 2rem;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(to bottom, rgba(19, 20, 13, 1), rgba(19, 20, 13, .9), rgba(19, 20, 13, 0)),
    var(--ft-image);
  background-size: 100% 100%, cover;
  background-position: bottom center, bottom;
  background-repeat: no-repeat, no-repeat;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* center children horizontally */
  gap: 3rem;
  text-align: center;
}

.footer-content {
  display: grid;
  grid-auto-flow: row;
  gap: 1.25rem;
  justify-items: center;
  /* center items inside the grid */
}

.footer-title {
  font-size: var(--normal-font-size);
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  column-gap: .75rem;
  justify-content: center;
}

.footer-social-link {
  color: var(--text-color);
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;

  transition: color .4s;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: var(--first-color);
}

.icon-facebook {
  --icon: url("../img/facebook-icon.svg");
}

.icon-instagram {
  --icon: url("../img/instagram-icon.svg");
}

.icon-linkedin {
  --icon: url("../img/linkedin-icon.svg");
}

.footer-social .footer-social-link {
  width: 1.5rem;
  height: 1.5rem;
}

.footer-copy {
  display: block;
  margin-top: 1rem;
  text-align: center;
  font-size: var(--small-font-size);
}

.pop-icon--footer {
  width: 4.5rem;
  height: 4.5rem;
}

.pop-icon--footer::before {
  width: 2.5rem;
  height: 2.5rem;
}

/*=============== WORK ===============*/

.work {
  position: relative;
  padding-block: 4rem 3rem;
  background-image: linear-gradient(to top, rgba(19, 20, 13, 1), rgba(19, 20, 13, .6), rgba(19, 20, 13, 0)), var(--bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  min-height: 50vh;
}

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

.work-title {
  font-size: var(--biggest-font-size);
  font-weight: var(--font-bold);
  text-align: center;
  color: var(--first-color);
  line-height: 1.1;
  min-height: 3.5rem;
  margin-top: 4rem;
}

.work .work-details.container {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  justify-content: center;
  margin: 0;
  text-align: center;
}

.work-detail-line {
  display: flex;
  justify-content: center;
  width: 100%;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.detail-list li {
  font-weight: 500;
  font-size: var(--h3-font-size);
  color: var(--white-color);
}

.work-description {
  font-size: var(--h3-font-size);
  text-align: center;
  color: var(--white-color);
  font-weight: var(--font-italice);
  margin-bottom: 2rem;
}

.work-description span {
  font-weight: var(--font-bold);
}

.work-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 3rem;
  row-gap: 2rem;
  padding-top: 2rem;
}

.work-detail {
  min-width: 0;
}

.work-detail-label {
  display: block;
  font-size: var(--h3-font-size);
  font-weight: var(--font-bold);
  margin-bottom: 0.75rem;
  text-align: left;
  white-space: normal;
}

.work-detail-info {
  color: var(--white-color);
  font-size: var(--normal-font-size);
  text-align: left;
  white-space: normal;
  line-height: 1.5;
}

.contribution-list,
.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--normal-font-size);
  color: var(--white-color);
  text-align: left;
}

.contribution-list {
  columns: 2;
  column-gap: 2rem;
}

.contribution-list li {
  break-inside: avoid;
}

.title-container {
  justify-content: center;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .work-details {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .work-details {
    grid-template-columns: 1fr;
  }
}

.picture,
.tools {
  padding-bottom: 3rem;
}


.section-subtitle {
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool img {
  height: 64px;
}

.tool span {
  margin-top: 0.5rem;
  font-size: var(--normal-font-size);
  color: var(--white-color);
}


.tools {
  margin-top: 2rem;
  text-align: center;
}

.tool-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.tool-icons img {
  height: 64px;
}

.section-divider {
  border: none;
  border-top: 3px solid var(--first-color);
  width: 80%;
  margin: 3rem auto;
}


/* small-screen tweaks */
@media (max-width: 820px) {

  .work .side-control.top-left,
  .work .side-control.top-right {
    top: calc(50% - 8px);
    /* tiny tweak on small devices */
  }

  .side-control .side-btn {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .side-control .side-label {
    font-size: 12px;
  }
}

/* BOTTOM controls in footer (aligned with .pop-btn) */
/* We place them inside .footer-container and align vertically center with its content */
.footer-container {
  position: relative;
}

/* container is positional context */
.footer-container .footer-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 40px;
  align-items: center;
  z-index: 30;
  pointer-events: auto;
}

/* left & right placement relative to footer container */
.footer-container .footer-controls.left {
  left: 28px;
}

/* left control group */
.footer-container .footer-controls.right {
  right: 28px;
}

/* right control group */

/* label color inside footer (light on dark footer) */
.footer-container .footer-controls .side-label {
  color: #ffffff;
}

/* responsive footer adjustments */
@media (max-width: 760px) {
  .footer-container .footer-controls {
    gap: 20px;
  }

  .footer-container .footer-controls .side-btn {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}

.picture-container--4 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  align-items: stretch;
}

.picture-container--4 .picture-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.picture-container--4 {
  grid-template-rows: auto auto;
}

.picture-container--4 .picture-img:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

.picture-container--4 .picture-img:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

.picture-container--4 .picture-img:nth-child(3) {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
}

.picture-container--4 .picture-img:nth-child(4) {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: stretch;
}

@media (max-width: 640px) {
  .picture-container--4 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
  }

  .picture-container--4 .picture-img {
    grid-column: 1 !important;
    grid-row: auto !important;
    align-self: auto;
    width: 100%;
    height: auto;
  }
}


/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  background-color: hsl(228, 4%, 15%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(228, 4%, 25%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(228, 4%, 35%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: var(--container-color);
  color: var(--title-color);
  box-shadow: 0 12px 24px hsla(228, 48%, 4%, .5);
  display: inline-flex;
  padding: 6px;
  font-size: 1.25rem;
  z-index: var(--z-tooltip);
  transition: bottom .4s, transform .4s;
  border-radius: 16px;
}

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

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

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

  .home-title {
    font-size: 2rem;
  }

  .home-buttons {
    flex-direction: column;
    row-gap: 1.5rem;
  }

  .picture-container {
    grid-template-columns: 200px;
    justify-content: center;
  }

  .filterable-cards {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .filterable-cards .card {
    width: min(100%, 320px);
  }

  .home-img {
    top: 24vh;
    left: 50%;
    width: clamp(120px, 80vw, 600px);
    ;
  }

  .me-img {
    top: 52vh;
    left: 65%;
    width: clamp(130px, 12vw, 240px);
    ;
  }

  .portfolio-filters.container {
    text-align: center;
  }

  .slide-btn {
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    padding: .75rem .5rem;
    border-radius: 18px;
    text-align: center;
  }

  .slide-btn img {
    width: 2.5rem;
    height: 2.5rem;
    display: block;
  }

  .slide-btn::before {
    left: 50%;
    top: calc(.75rem + 1.25rem);
    width: 1.25rem !important;
    height: 1.25rem !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(1);
    transition: transform .35s ease !important;
  }

  /* pop animation only */
  .slide-btn:hover::before,
  .slide-btn:focus-visible::before,
  .slide-btn.active::before {
    width: 1.25rem !important;
    height: 1.25rem !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(2);
  }

}


/* For medium devices */
@media screen and (min-width: 576px) {

  .home-container,
  .new-container {
    grid-template-columns: 400px;
    justify-content: center;
  }

  .home-img {
    top: 18vh;
    left: 50%;
    width: clamp(320px, 75vw, 900px);
    ;
  }

  .me-img {
    top: 52vh;
    left: 65%;
    width: clamp(160px, 12vw, 320px);
    ;
  }

  .picture-container {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
  }

  .portfolio-content {
    --card-w: 260px;
    --card-gap: 28px;
  }
}

@media screen and (min-width: 768px) {
  :root {
    --biggest-font-size: 3.25rem;
  }

  .nav-menu {
    width: 50%;
  }

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

  .new-card:nth-child(even) {
    transform: translateY(10rem);
  }

  .about-text p {
    padding: 0 3rem;
  }

  .picture-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
  }

  .portfolio-content {
    --card-w: 280px;
    --card-gap: 32px;
  }

  .home-img {
    top: 16vh;
    left: 50%;
    width: clamp(320px, 56vw, 800px);
  }

  .me-img {
    top: 53vh;
    left: 62%;
    width: clamp(140px, 14vw, 240px);
  }

  .footer-container {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }

  .work-title {
    height: 60px;
  }
}

/* For large devices */

@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.25rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
  }

  .logo-drop {
    transform: translateY(-1.5rem);
  }

  .container {
    margin-inline: auto;
  }

  .picture-container {
    margin-inline: auto;
  }

  .portfolio-content {
    --card-w: 400px;
    --card-gap: 40px;
  }

  .section {
    padding-block: 5rem 5rem;
  }

  .section-title {
    margin-bottom: 1.5rem;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* stop spreading children */
  }

  .nav-toggle,
  .nav-close {
    display: none;
  }

  .nav-logo i {
    font-size: 1.5rem;
  }

  .nav-menu {
    width: initial;
    margin-left: auto;
    /* push the menu to the far right */
    display: flex;
  }

  .nav-list {
    flex-direction: row;
    column-gap: 3.5rem;
    justify-content: flex-end;
    /* items align to the right edge */
    align-items: center;
  }

  .nav-actions {
    display: none;
  }

  .home-container {
    grid-template-columns: 480px 535px;
    align-items: center;
    column-gap: 4rem;
    padding-top: 4rem;
  }

  .home-img {
    top: 12vh;
    left: 50%;
    width: clamp(320px, 50vw, 800px);
  }

  .me-img {
    top: 54vh;
    left: 60%;
    width: clamp(120px, 14vw, 360px);
  }

  .home-data {
    text-align: initial;
  }

  .home-description {
    margin-bottom: 4.5rem;
  }

  .home-buttons {
    justify-content: initial;
    column-gap: 1.5rem;
  }

  .new-container {
    grid-template-columns: 412px 490px;
    align-items: center;
    column-gap: 7.5rem;
  }

  .new-data,
  .new-data .section-title {
    text-align: initial;
  }

  .new-content {
    row-gap: 8.5rem;
  }

  .new-title {
    font-size: var(--h3-font-size);
  }


  .about-me {
    grid-template-columns: 400px 480px;
    align-items: stretch;
    justify-content: center;
    column-gap: 5rem;
  }

  .about-picture,
  .about-text {
    align-self: start;
  }

  .about-text {
    height: 100%;
    display: grid;
    grid-auto-rows: max-content;
    text-align: initial;
  }

  .about-text p {
    padding: 0;
  }

  .about-title {
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
    color: var(--first-color);
    text-align: initial;
  }

  .about-item p {
    font-size: var(--h2-font-size);
    color: var(--white-color)
  }

  .about-img {
    width: 400px;
    height: auto;
    border: 5px solid var(--first-color);
    border-radius: 16rem;
  }

  .interests-container {
    grid-template-columns: 420px 420px;
    column-gap: 8rem;
    padding-top: 5rem;
    padding-bottom: 5rem;
    justify-content: center;
  }

  .interests-list {
    row-gap: 1.5rem;
  }

  .picture-container {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.75rem;
  }

  .contact-container {
    grid-template-columns: 280px 480px;
    justify-content: center;
    align-items: center;
    column-gap: 8rem;
  }

  .contact-content {
    order: -1;
    text-align: initial;
    row-gap: 2.5rem;
  }

  .contact-social {
    justify-content: initial;
  }

  .contact-img {
    width: 480px;
  }

  .footer-title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
  }

  .footer-social {
    column-gap: 1rem;
  }

  .scrollup {
    right: 3rem;
  }

  .work-title {
    height: 80px;
  }
}

/*=============== CURSOR ===============*/
html,
body {
  cursor: url("../img/cursor/default-cursor.svg") 8 8, auto;
}

/* ---- Interactive: links & buttons ---- */
a,
button,
[role="button"],
label,
input[type="submit"],
input[type="button"] {
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer;
}

/* If you only want the hover image when actually hovered */
a:hover,
button:hover,
[role="button"]:hover,
label:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer;
}

/* ---- Active / mouse down (element-level) ---- */
a:active,
button:active,
[role="button"]:active,
input[type="submit"]:active,
input[type="button"]:active {
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer;
}

/* ---- Text inputs & editable areas ---- */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
textarea,
[contenteditable="true"] {
  cursor: url("../img/cursor/type-cursor.svg") 8 12, text;
}

/* Optional: “disabled / not allowed” (5th case example) */
[disabled],
.is-disabled,
.cursor-not-allowed {
  cursor: not-allowed;
  /* replace with your 5th PNG if you have it */
  /* e.g., cursor: url("/cursor/not-allowed-cursor.png") 8 8, not-allowed; */
}

/* ---- Global "clicking" state (set via JS on mousedown) ---- */
.is-clicking,
.is-clicking * {
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer !important;
}

/* Base hover cursor for all cards */
.filterable-cards .card,
.filterable-cards .card * {
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer !important;
}

/* Click (active) cursor when pressed */
.filterable-cards .card:active,
.is-clicking .filterable-cards .card,
.is-clicking .filterable-cards .card * {
  cursor: url("../img/cursor/hover-cursor.svg") 8 8, pointer !important;
}