@media (max-width: 768px) {
  #hero {
    background-image: url('img/backgrounds/background4.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
  }

  #bg1,
  #bg2 {
    display: none !important;
  }

  h1 {
    font-size: 48px !important;
    line-height: 1.2;
    margin-bottom: 0.2rem;
  }
  .about h3,
  .about h4 {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  /* Navbar */
  .navbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: clamp(4px, 1.2vw, 6px) clamp(4px, 1.8vw, 8px);
    background-color: black;
    z-index: 1000;
    overflow-x: hidden;
  }

  .home {
    flex: 0 0 auto;
    justify-content: flex-start;
    margin-right: 0;
  }

  .logo {
    height: clamp(11px, 3vw, 14px);
  }

  .navbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6px, 1.5vw, 8px) clamp(4px, 1.4vw, 6px);
    font-size: clamp(10px, 2.3vw, 12px);
    text-align: center;
    white-space: nowrap;
  }

  /* Hero Section */
  .name {
    height: 40vh;
  }

  .name .bg-video {
    width: 100vw;
    height: auto;
  }

  /* About Section */
  .about {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 30px;
  }

  /* Experience Section */
  .experience {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    max-width: 100%;
    margin: 0 auto;
  }

  .experience-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    max-width: 100%;
    margin: 0 auto;
  }

  .experience-grid .box {
    max-width: 300px;
    width: 100%;
    padding: 15px;
    margin: 10px auto;
  }

  .box {
    margin: 10px auto;
    width: 100%;
    max-width: 300px;
  }

  .alanai {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .research {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .pilotCity {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Work */
  .work-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .work-nav {
    display: none;
  }

  .work-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
    scroll-behavior: smooth;
    transition: transform 0.4s ease;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 8px 0 14px;
  }

  .content-box {
    position: relative;
    flex: 0 0 min(82%, 280px);
    width: min(82%, 280px);
    max-width: min(82%, 280px);
    min-width: 0;
    padding: 12px;
    border: 2px solid #444;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    scroll-snap-align: center;
    margin: 0;
  }

  .content-box h2 {
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 5px;
  }

  .project-date {
    font-size: 0.75rem;
    top: 6px;
    right: 8px;
  }

  .project-role {
    font-size: 10px;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
  }

  .project-role {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b6b6b;
    margin: 0 0 14px;
  }

  .project-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0.9rem 0 0.2rem;
    flex-wrap: wrap;
  }

  .project-actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .project-link {
    min-height: 42px;
    padding: 0.65rem 0.85rem;
    letter-spacing: 1px;
    font-size: 13px;
  }

  .project-link-primary {
    flex: 0 0 auto;
    order: 1;
  }

  .project-link-github {
    order: 2;
  }

  .content-box p {
    font-size: 13px;
    line-height: 1.45;
  }

  .project-icons .icon-img {
    width: 18px;
    height: auto;
    margin-right: 0;
    margin-left: 0;
  }

  .showcase-section {
    margin: 10px 0;
  }

  .showcase-section img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
  }

  /* Contact Section */
  .contact {
    padding: 30px;
  }

  .socials {
    gap: clamp(14px, 4vw, 24px);
    padding: clamp(10px, 2.8vw, 14px);
  }

  .socials svg,
  .socials img.social-icon {
    width: clamp(26px, 7vw, 34px);
    height: clamp(26px, 7vw, 34px);
  }

  /* Buttons */
  button {
    width: 100%;
    padding: 1em;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: clamp(3px, 1vw, 5px) clamp(3px, 1.2vw, 4px);
  }

  .navbar a {
    padding: clamp(5px, 1.3vw, 7px) clamp(3px, 1vw, 4px);
    font-size: clamp(8px, 2.8vw, 11px);
  }

  .logo {
    height: clamp(9px, 3vw, 12px);
  }

  .work-overlay {
    padding: 50px 12px;
  }

  .work-track {
    gap: 10px;
  }

  .content-box {
    flex-basis: min(88%, 220px);
    width: min(88%, 220px);
    min-width: 0;
    max-width: min(88%, 220px);
    padding: 10px;
  }

  .content-box h2 {
    font-size: 15px;
  }

  .content-box p {
    font-size: 12px;
  }

  .project-link {
    width: 100%;
    min-height: 38px;
    font-size: 12px;
  }

  .socials {
    gap: clamp(10px, 3.5vw, 16px);
    padding: clamp(8px, 2.5vw, 12px);
  }

  .socials svg,
  .socials img.social-icon {
    width: clamp(22px, 7vw, 28px);
    height: clamp(22px, 7vw, 28px);
  }
}


/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Raleway', sans-serif;
}

/* Logo Styles */
.home {
  margin-right: auto;
  display: flex;
  align-items: center;
}

.logo {
  height: 20px;
  width: auto;
}


/* Typography */
h1 {
  font-size: 90px;
  margin-bottom: 1px;
}

h2 {
  font-size: 25px;
  margin-top: 0;
  line-height: 1.2;
}

h3 {
  font-size: 40px;
  margin-top: 10px;
  line-height: 0;
}

h4 {
  font-size: 28px;
  margin-top: 0px;
  margin-bottom: 20px;
}

h6 {
  font-size: 22px;
  margin-top: 0px;
  margin-bottom: 0px;
}

h5 {
  font-size: 20px;
  margin-top: 0px;
  color: rgb(121, 121, 121);
  margin-bottom: 0px;
}

p {
  font-size: 20px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  background-color: black;
  box-sizing: border-box;
  display: flex;
  padding: 2px 15px;
  width: 100%;
  z-index: 1000;
}

.navbar a {
  color: rgb(172, 171, 171);
  text-decoration: none;
  padding: 14px 20px;
  font-size: 18px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #fff;
  filter: brightness(300%);
}

/* Hero Section */
.name {
  position: relative;
  height: 60vh;
  overflow: hidden;
}

.name .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: -1;
  pointer-events: none;
}

.overlay {
  width: 100%;
  height: 100%;
  background: #00000080;
}

.name-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
}

/* About Section */
.about {
  padding: 80px;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
}

.about h3 {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.about h3.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.about p {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s ease;
}

.about p:nth-of-type(1).animate-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.about p:nth-of-type(2).animate-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.about p:nth-of-type(3).animate-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.button-wrapper {
  margin-top: 15px;
  opacity: 0;
  transform: translateY(15px) scale(0.95);
  transition: all 0.3s ease;
}

.button-wrapper:nth-of-type(1).animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.25s;
}

.button-wrapper:nth-of-type(2).animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.3s;
}

/* Button Styles */
button {
  font-size: 15px;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 2px;
  font-weight: bold;
  text-align: center;
  padding: 0.7em 2em;
  border: 3px solid #000;
  border-radius: 2px;
  background: none;
  color: #000;
  text-decoration: none;
  box-shadow: 0 2px 2px black, 0 2px 2px black;
  transition: 0.3s ease all;
  position: relative;
  z-index: 1;
}

button:before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 50%;
  bottom: 0;
  background-color: black;
  opacity: 0;
  transition: 0.5s all ease;
  z-index: -1;
}

button:hover,
button:focus-visible {
  color: white;
}

button:hover:before,
button:focus-visible:before {
  left: 0;
  right: 0;
  opacity: 1;
}

button:active {
  transform: scale(0.9);
}

.project-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.7em 1.4em;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 2px;
  font-weight: bold;
  border: 3px solid #000;
  border-radius: 2px;
  background: none;
  color: #000;
  text-decoration: none;
  box-shadow: 0 2px 2px black, 0 2px 2px black;
  transition: 0.3s ease all;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.project-link:before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 50%;
  bottom: 0;
  background-color: #000;
  opacity: 0;
  transition: 0.5s all ease;
  z-index: -1;
}

.project-link:hover,
.project-link:focus-visible {
  color: #fff;
}

.project-link:hover:before,
.project-link:focus-visible:before {
  left: 0;
  right: 0;
  opacity: 1;
}

.project-link:active {
  transform: scale(0.9);
}

.project-link img {
  width: 20px;
  height: 20px;
  display: block;
  filter: brightness(0) saturate(100%);
}

.project-link:hover img,
.project-link:focus-visible img {
  filter: brightness(0) invert(1);
}

.project-link-primary {
  order: 1;
  flex: 0 0 auto;
}

.project-link-github {
  order: 2;
  min-width: 132px;
  background-color: #000;
  color: #fff;
}

.project-link-github:before {
  background-color: #fff;
}

.project-link-github img {
  filter: brightness(0) invert(1);
}

.project-link-github:hover,
.project-link-github:focus-visible {
  color: #000;
}

.project-link-github:hover img,
.project-link-github:focus-visible img {
  filter: brightness(0) saturate(100%);
}

/* Experience Section */
.experience-background {
  background-color: #eae9e9;
  width: 100%;
}

.experience {
  padding: 90px;
  max-width: 1000px;
  margin: 0 auto;
}

.experience h3 {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

.experience h3.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.alanai {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.alanai img {
  width: 60px;
  height: auto;
  border-radius: 8px;
  background-color: white;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.research {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.research img {
  width: 75px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pilotCity {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.pilotCity img {
  width: 75px;
  height: auto;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.experience-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  box-sizing: border-box;
  justify-content: center;
  margin-top: 60px;
}

.box h4 {
  text-align: center;
  background: linear-gradient(135deg, #333 0%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.experience-icons {
  display: grid;
  grid-template-columns: repeat(3, minmax(56px, 1fr));
  gap: 14px;
  align-items: center;
  justify-items: center;
}

.experience-icons svg {
  width: 60px;
  height: 60px;
  max-width: 250px;
  max-height: 250px;
  filter: grayscale(100%) saturate(0);
  transition: transform 0.6s ease, fill 0.6s ease, filter 0.6s ease;
}

.experience-icons svg:hover {
  transform: rotate(360deg) scale(1.5);
  filter: grayscale(0%) saturate(1);
  fill: initial;
}

.icon-img {
  width: 60px;
  height: 60px;
  filter: grayscale(100%) saturate(0) brightness(0.8);
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
}

.project-icons {
  margin: 0.75rem 0 0.2rem;
}
.project-icons .icon-img {
    width: 24px;
    height: auto;
    margin-right: 0.4rem;
    vertical-align: middle;
    animation: none !important;
    transition: none !important;
    filter: none !important;
    cursor: default !important;
}

.project-icons .icon-img:hover {
    transform: none !important;
    filter: none !important;
}

.project-date {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.9rem;
    color: #555;
    font-weight: bold;
}

.project-role {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #666;
  margin: 0 0 0.9rem;
}

.box.animate-in .icon-img {
  animation: popIn 0.5s ease-out backwards;
}

.icon-img:hover {
  filter: grayscale(0%) saturate(1.2) brightness(1.1) drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  transform: rotate(360deg) scale(1.5);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.box.animate-in .experience-icons .icon-img:nth-child(1) { animation-delay: 0.1s; }
.box.animate-in .experience-icons .icon-img:nth-child(2) { animation-delay: 0.15s; }
.box.animate-in .experience-icons .icon-img:nth-child(3) { animation-delay: 0.2s; }
.box.animate-in .experience-icons .icon-img:nth-child(4) { animation-delay: 0.25s; }
.box.animate-in .experience-icons .icon-img:nth-child(5) { animation-delay: 0.3s; }
.box.animate-in .experience-icons .icon-img:nth-child(6) { animation-delay: 0.35s; }
.box.animate-in .experience-icons .icon-img:nth-child(7) { animation-delay: 0.4s; }
.box.animate-in .experience-icons .icon-img:nth-child(8) { animation-delay: 0.45s; }
.box.animate-in .experience-icons .icon-img:nth-child(9) { animation-delay: 0.5s; }
.box.animate-in .experience-icons .icon-img:nth-child(10) { animation-delay: 0.55s; }
.box.animate-in .experience-icons .icon-img:nth-child(11) { animation-delay: 0.6s; }

.box {
  color: black;
  width: 260px;
  padding: 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(40px);
  position: relative;
  overflow: hidden;
}

.box.animate-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.box:hover::before {
  opacity: 1;
}

.box:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25), 0 0 40px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Work Section */
.work-background {
  position: relative;
  overflow: hidden;
  background: url('img/backgrounds/background1.jpeg')no-repeat center center;
  background-size: cover;
  transition: background-image 1s ease-in-out;
}

.work {
  justify-content: space-between;
  margin: 0 auto;
  color: white;
}

.work-overlay {
  background: #00000080;
  position: relative;
  z-index: 2;
  padding: 50px;
}

.work-text {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.work-text.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.work-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 10px;
}

.work-track {
  display: flex;
  flex: 1;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  padding: 10px 12px;
  scroll-behavior: smooth;
}

.work-track {
  scrollbar-width: auto;
  scrollbar-color: rgba(255, 255, 255, 0.8) rgba(255, 255, 255, 0.22);
}

.work-track::-webkit-scrollbar {
  height: 10px;
}

.work-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.work-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.12);
}

.work-track::-webkit-scrollbar-thumb:hover {
  background: #ffffff;
}

.work-nav {
  font-size: 15px;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 2px;
  font-weight: bold;
  text-align: center;
  padding: 0.7em 2em;
  border: 3px solid #000;
  border-radius: 2px;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  box-shadow: 0 2px 2px #000, 0 2px 2px #000;
  transition: 0.3s ease all;
  position: relative;
  z-index: 1;
}

.work-nav:hover {
  color: white;
}

.work-nav:before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 50%;
  bottom: 0;
  background-color: #000;
  opacity: 0;
  transition: 0.5s all ease;
  z-index: -1;
}

.work-nav:hover:before,
.work-nav:focus:before {
  left: 0;
  right: 0;
  opacity: 1;
}

.work-nav:active {
  transform: scale(0.9);
}

.content-box {
  color: black;
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 320px;
  max-width: 440px;
  padding: 24px;
  box-sizing: border-box;
  border: 2px solid #444;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
  transition: all 0.6s ease;
  scroll-snap-align: start;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
}

.content-box.animate-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.content-box:hover {
  transform: scale(1.02);
  box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.3);
}

.content-box h2 {
  margin: 8px 0 4px;
  line-height: 1.05;
}

.project-role {
  line-height: 1;
  margin: 0 0 0.95rem;
}

.content-box .project-icons {
  margin: 0.9rem 0 0.2rem;
}

.showcase-section {
  width: 100%;
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
}

.showcase-section video,
.showcase-section img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.showcase-section--lower video,
.showcase-section--lower img {
  object-position: 55%;
}

.showcase-section .tile-mapping-zoom {
  transform: scale(3);
  transform-origin: center;
}

/* Contact Section */
.contact-background {
  background-color: #eae9e9;
  width: 100%;
}

.contact {
  text-align: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 60px;
  flex-wrap: wrap;
}

.contact h3 {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.contact h3.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.contact p {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s ease;
}

.contact p.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.socials {
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 14px;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  gap: 30px;
}

.socials a {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition: all 0.3s ease;
}

.socials a:hover {
  transform: scale(1.1);
}

.socials svg {
  width: 40px;
  height: 40px;
  cursor: pointer;
  fill: white;
  stroke: transparent;
  stroke-width: 2px;
  border-radius: 8px;
  background-color: transparent;
  transition: all 0.3s ease;
  display: block;
}

.socials img.social-icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 8px;
  background-color: transparent;
  transition: all 0.3s ease;
  display: block;
  filter: invert(1);
}

.socials svg:hover {
  fill: black;
  background-color: white;
  stroke: black;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.socials img.social-icon:hover {
  background-color: white;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  filter: invert(0);
}

#hero {
  position: relative;
  overflow: hidden;
}

.bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 0;
}

.bg-slide.visible {
  opacity: 1;
  z-index: 1;
}

@media (max-width: 768px) {
  .navbar {
    padding: clamp(5px, 1.5vw, 8px) clamp(6px, 2.2vw, 12px);
  }

  .logo {
    height: clamp(13px, 3.6vw, 18px);
  }

  .navbar a {
    padding: clamp(7px, 1.9vw, 10px) clamp(6px, 1.9vw, 10px);
    font-size: clamp(11px, 2.7vw, 15px);
  }

  .work-carousel,
  .work-track {
    width: 100%;
    box-sizing: border-box;
  }

  .work-track {
    gap: 12px;
    padding: 8px 0 14px;
  }

  .content-box {
    flex: 0 0 min(82%, 360px);
    width: min(82%, 360px);
    max-width: min(82%, 360px);
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .project-date {
    top: 6px;
    right: 10px;
    font-size: 0.8rem;
  }

  .experience-grid .box {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .experience-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    max-width: 240px;
    margin: 0 auto;
  }

  .experience-icons svg,
  .experience-icons .icon-img {
    width: 52px;
    height: 52px;
  }

  .socials {
    gap: clamp(14px, 4vw, 24px);
    padding: clamp(10px, 2.8vw, 14px);
  }

  .socials svg,
  .socials img.social-icon {
    width: clamp(26px, 7vw, 34px);
    height: clamp(26px, 7vw, 34px);
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: clamp(4px, 1.2vw, 6px) clamp(4px, 1.6vw, 7px);
  }

  .navbar a {
    padding: clamp(6px, 1.7vw, 8px) clamp(4px, 1.3vw, 6px);
    font-size: clamp(10px, 3.2vw, 13px);
  }

  .logo {
    height: clamp(11px, 3.4vw, 14px);
  }

  .work-overlay {
    padding: 50px 12px;
  }

  .content-box {
    flex: 0 0 min(86%, 300px);
    width: min(86%, 300px);
    max-width: min(86%, 300px);
    padding: 10px;
  }

  .content-box h2 {
    font-size: 15px;
  }

  .content-box p {
    font-size: 12px;
  }

  .project-link {
    width: 100%;
    min-height: 38px;
    font-size: 12px;
  }

  .experience-icons {
    gap: 12px;
    max-width: 220px;
  }

  .experience-icons svg,
  .experience-icons .icon-img {
    width: 46px;
    height: 46px;
  }

  .socials {
    gap: clamp(10px, 3.5vw, 16px);
    padding: clamp(8px, 2.5vw, 12px);
  }

  .socials svg,
  .socials img.social-icon {
    width: clamp(22px, 7vw, 28px);
    height: clamp(22px, 7vw, 28px);
  }
}

