/* ========== CSS VARIABLES ========== */
:root {
  --color-bg-primary: #010b40;
  --color-bg-secondary: #020f59;
  --color-accent-1: #110273;
  --color-accent-2: #21038c;
  --color-highlight: #2703a6;
  --color-text: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.9);
  --color-error: #ff6b6b;
  --color-success: #4caf50;
}

/* ========== GLOBAL STYLES ========== */
html,
body {
  margin: 0;
  font-family: poppins, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--color-bg-primary);
  color: var(--color-text);
  overscroll-behavior-y: none; /* Completely prevent over-scrolling */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  -webkit-font-smoothing: antialiased; /* Better font rendering on iOS */
  -moz-osx-font-smoothing: grayscale;
}

.page.wrapper {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  width: 100%;
  padding-top: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  overscroll-behavior-y: none; /* Completely prevent over-scrolling */
  /* Hide scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.page.wrapper::-webkit-scrollbar {
  display: none;
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3 {
  margin: 0;
  color: var(--color-text);
}

p {
  font-size: 1.25rem;
}

/* ========== UTILITY CLASSES ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}

.containerintro {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  width: 100%;
  box-sizing: border-box;
}

.containerproj,
.containerheader {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.containerintro .container {
  padding: 0;
}

/* ========== HEADER SECTION ========== */
.header {
  background-color: rgba(1, 11, 64, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text);
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  box-shadow: 0 1px 25px white;
  height: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0px;
}

.logo-container a {
  text-decoration: none;
  color: inherit;
}

.logo-container a:hover {
  text-decoration: none;
}

.containerheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}

.site-title {
  height: 25px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
}

.site-title:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* ========== NAVIGATION ========== */
nav {
  display: flex;
  align-items: center;
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
}

.desktop-nav .nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.desktop-nav .nav-links li a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 8px 16px;
  border-radius: 6px;
}

.desktop-nav .nav-links li a:hover {
  color: white;
  background-color: var(--color-highlight);
}

.desktop-nav .nav-links li a.active {
  color: var(--color-text);
  background-color: var(--color-highlight);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cv-btn-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;

  border-radius: 15px;
  border: 2px solid var(--color-highlight);
  background-color: var(--color-accent-1);
  color: var(--color-text);
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: transform 0.2s, background-color 0.2s;
  white-space: nowrap;
}

.cv-btn-header:hover {
  background-color: var(--color-highlight);
  transform: scale(1.05);
}

.cv-btn-header svg {
  flex-shrink: 0;
}

/* Mobile Navigation */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.menu-toggle:hover {
  background-color: rgba(39, 3, 166, 0.2);
}

/* Overlay Navigation */
.overlay-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(1, 11, 64, 0.99);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1001;
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}

.overlay-nav.active {
  transform: translateY(0);
}

.overlay-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.overlay-links li {
  margin: 20px 0;
}

.overlay-links li a {
  color: var(--color-text);
  font-size: 2rem;
  text-decoration: none;
  transition: color 0.2s;
}

.overlay-links li a:hover {
  color: var(--color-highlight);
}

.overlay-links li a.active {
  color: white;
  font-weight: bold;
  text-decoration: underline;
}

.cv-link-mobile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  margin-top: 20px;
  border-radius: 15px;
  border: 2px solid var(--color-highlight);
  background-color: var(--color-accent-1);
  color: var(--color-text) !important;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  transition: transform 0.2s, background-color 0.2s;
}

.cv-link-mobile:hover {
  background-color: var(--color-highlight);
  transform: scale(1.05);
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
}

/* ========== INTRO SECTION ========== */
.intro {
  padding: 0;
  margin-top: 0;
  position: relative;
  background-image: url("images/background/2202-0025_RVFX_2110_ShapeGradientLoopBackgrounds_A03A_Neg_Orange_Purple_F001_STILL.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-text);
  text-align: left;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

.intro:not(:first-of-type) {
  margin-top: 0;
}

.intro:first-of-type {
  margin-top: 0;
  min-height: 100vh;
  padding-top: 0;
  padding-bottom: 20px;
}

.intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(1, 11, 64, 0.7);
  z-index: 1;
}

.intro .containerintro {
  position: relative;
  z-index: 2;
}

.profile {
  border-radius: 50%;
  max-width: 353px;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Intro Scroll Animation */
.intro p {
  font-size: 2.2rem;
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.intro p .name-highlight {
  position: relative;
  transition: all 0.3s ease;
  z-index: 1;
}

.intro p .name-highlight::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: #ffae35;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  z-index: -1;
}

.intro p:hover .name-highlight::after {
  width: 100%;
}

.intro h2 {
  font-size: 3.2rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}

/* ========== BUTTONS ========== */
.button1 {
  border-radius: 15px;
  border: 2px solid var(--color-highlight);
  background-color: var(--color-accent-1);
  padding: 10px;
  width: 150px;
  height: 50px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-text);
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  margin: 20px;
}

.button1:hover {
  background-color: var(--color-highlight);
  transform: scale(1.05);
}

/* ========== PROJECTS SECTION ========== */
.projects {
  width: 100%;
  background-color: var(--color-bg-primary);
  /* Removed padding to allow full width backgrounds */
}

.project-card {
  background: var(--color-accent-2);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100%;
  text-align: center;
  scroll-snap-align: start;
  padding: 0 40px;
  box-sizing: border-box;
}

.project-card--one {
  background: linear-gradient(to right, #1a2a6c, #b21f1f, #fdbb2d);
}

.project-card--two {
  background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
}

.project-card--three {
  background: linear-gradient(to right, #ff512f, #dd2476);
}

.project-card--four {
  background: linear-gradient(to right, #00c6ff, #0072ff);
}

/* Project Card  */
.project-content {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 3rem;
  gap: 1rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.project-image {
  flex: 1;
  max-width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 45%;
  overflow: hidden;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: rgba(255, 255, 255, 0.9);
}

.dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.project-image img:not(.carousel-image) {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.project-image img:hover {
  transform: scale(1.02);
}

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
}

.project-info {
  align-items: center;
  text-align: center;
}

.project-title {
  font-size: 2.5rem;
  margin: 0;
  color: var(--color-text);
}

.project-description {
  font-size: 1.5 rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}

.tech-stack {
  justify-content: center;
}

.tech-tag {
  background-color: var(--color-accent-1);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.tech-tag:hover {
  background-color: var(--color-highlight);
}

.project-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: auto;
}

.project-links {
  justify-content: center;
}

.github-link {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.github-link:hover {
  transform: scale(1.1);
}

.project-github-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.demo-link {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--color-highlight);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.demo-link:hover {
  background-color: var(--color-highlight);
  transform: translateY(-2px);
}

/* ========== TIMELINE SECTION ========== */
.timeline-section {
  background-color: var(--color-bg-primary);
  padding: 120px 0 80px 0;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  position: relative;
}

.timeline-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(39, 3, 166, 0.1) 0%,
    rgba(2, 15, 89, 0.1) 100%
  );
  z-index: 1;
}

.timeline-section .container {
  position: relative;
  z-index: 2;
}

.timeline-title {
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 4rem;
  color: var(--color-text);
  font-weight: 600;
}

.timeline {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -50px;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 25%,
    rgba(255, 255, 255, 0.8) 85%,
    transparent 100%
  );
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  /* margin-bottom: 4rem; */
  width: 100%;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: 55%;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 55%;
  margin-right: 0;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--color-highlight);
  border: 4px solid var(--color-bg-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--color-accent-1);
  transition: all 0.3s ease;
}

.timeline-dot:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 6px var(--color-accent-1);
}

.timeline-content {
  background: rgba(39, 3, 166, 0.4);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--color-highlight);
  position: relative;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--color-text);
  background: rgba(39, 3, 166, 0.5);
}

/* Removed active state animations for better performance */

.timeline-date {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-role {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.timeline-description {
  font-size: 1rem;
  line-height: 1.7; /* Increased for better readability */
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  text-align: justify; /* Justify text for cleaner appearance */
  hyphens: auto; /* Better word breaking */
  word-spacing: 0.05em; /* Slightly increased word spacing */
  text-rendering: optimizeLegibility; /* Better font rendering */
}

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem; /* Increased gap for better spacing between tags */
  margin-top: 0.5rem; /* Add some top margin for better separation */
}

.skill-tag {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text);
  padding: 0.4rem 0.8rem; /* Increased padding for better touch targets */
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.02em; /* Better letter spacing */
  text-rendering: optimizeLegibility; /* Better font rendering */
  line-height: 1.2; /* Better line height for tags */
  white-space: nowrap; /* Prevent tag text wrapping */
}

.skill-tag:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  border-color: var(--color-text);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* ========== CONTACT SECTION ========== */
.contact {
  text-align: center;
  align-items: center;
  justify-content: center;
  display: flex;
  min-height: 100vh;
  width: 100%;
  padding: 80px 0 120px 0; /* Extended bottom padding for more background */
  box-sizing: border-box;
  scroll-margin-top: 0;
  position: relative;
  scroll-snap-align: start;
  background-color: var(--color-bg-primary);
}

.contact .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  margin-top: 100px;
  margin-bottom: 100px;
  box-sizing: border-box;
  position: relative;
}

#contacttitle {
  font-size: 4rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  position: relative;
  z-index: 2;
}

#contacttitle.animate-up {
  transform: translateY(-200px) scale(0.9);
  margin-bottom: 1rem;
}

/* Contact Form */
#contact-form {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(20px);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  width: 100%;
  padding: 20px;
  background-color: var(--color-bg-secondary);
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

#contact-form.visible {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
  visibility: visible;
}

#show-form {
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#show-form.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.form-group {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  padding: 8px;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
}

input,
textarea {
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--color-accent-1);
  border-radius: 8px;
  background-color: var(--color-bg-primary);
  color: var(--color-text);
  resize: vertical;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-highlight);
  box-shadow: 0 0 0 3px rgba(39, 3, 166, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-status {
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

#sendmessage:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========== FOOTER SECTION ========== */
.footer {
  background-color: var(--color-bg-primary);
  color: var(--color-text);
  padding: 15px 0;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  overscroll-behavior-y: contain; /* Prevent over-scrolling past footer */
  position: relative;
  z-index: 10; /* Ensure footer appears above intro background */
}

.footer-flex {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.footer-text {
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 12px;
}

.foot-icon {
  height: 16px;
  width: 16px;
  transition: transform 0.2s, opacity 0.2s; /* Changed from filter to opacity */
  /* Safari-specific fixes */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.foot-icon:hover {
  transform: scale(1.5) translateZ(0); /* Added hardware acceleration */
  opacity: 0.8; /* Use opacity instead of filter for Safari compatibility */
}

/* ========== ACCESSIBILITY ========== */
/* Add focus styles for better accessibility */
.button1:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

/* Improve touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .button1,
  .nav-links li a,
  .overlay-links li a,
  .foot-icon {
    min-height: 16px;
    min-width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
  .intro,
  .project-card,
  .contact {
    min-height: -webkit-fill-available;
  }

  /* Fix for iOS Safari viewport height */
  .page.wrapper {
    height: -webkit-fill-available;
  }

  /* Ensure consistent height across iOS devices */
  .intro:first-of-type {
    min-height: -webkit-fill-available;
  }

  .contact {
    min-height: -webkit-fill-available;
  }

  /* iOS-specific button and input fixes */
  button,
  input,
  textarea {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
  }

  /* Fix iOS tap highlight */
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* iOS 26+ Specific Optimizations */
@supports (height: 100dvh) {
  .page.wrapper {
    height: 100dvh; /* Use dynamic viewport height for iOS 26+ */
  }

  .intro,
  .project-card,
  .contact {
    min-height: 100dvh; /* Use dynamic viewport height for iOS 26+ */
  }

  .intro:first-of-type {
    min-height: 100dvh;
  }

  .contact {
    min-height: 100dvh;
  }

  /* Additional iOS 26+ fixes */
  html,
  body {
    height: 100dvh;
    min-height: 100dvh;
  }
}

/* iOS 26+ Safe Area Support */
@supports (padding: env(safe-area-inset-top)) {
  .header {
    padding-top: max(15px, env(safe-area-inset-top));
  }

  .intro:first-of-type {
    padding-top: max(0, env(safe-area-inset-top));
  }
}

/* iOS 26+ Enhanced Viewport Fixes */
@supports (height: 100dvh) and (-webkit-touch-callout: none) {
  /* Specific fixes for iOS 26 Safari */
  html {
    height: 100dvh;
    height: -webkit-fill-available;
  }

  body {
    height: 100dvh;
    height: -webkit-fill-available;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .page.wrapper {
    height: 100dvh;
    height: -webkit-fill-available;
  }

  .intro,
  .project-card,
  .contact {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
}

/* Safari-specific icon fixes */
@supports (-webkit-appearance: none) {
  .foot-icon {
    /* Force consistent rendering in Safari */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Ensure consistent sizing */
    max-width: none;
    max-height: none;
  }
}

/* Safari Mobile Viewport Fixes - Enhanced for iOS 26 */
@supports (-webkit-touch-callout: none) and (max-width: 1023px) {
  /* Enhanced viewport fixes for iOS 26 Safari */
  html,
  body {
    height: 100vh;
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  .page.wrapper {
    height: 100vh;
    height: -webkit-fill-available; /* Safari mobile viewport fix */
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  .intro {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Safari mobile viewport fix */
    height: 100vh;
    height: -webkit-fill-available;
    background-attachment: scroll; /* Fix Safari mobile background issues */
  }

  .intro:first-of-type {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Safari mobile viewport fix */
    height: 100vh;
    height: -webkit-fill-available;
  }

  .project-card {
    height: 100vh;
    height: -webkit-fill-available; /* Safari mobile viewport fix */
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  .contact {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Safari mobile viewport fix */
    height: 100vh;
    height: -webkit-fill-available;
  }

  /* Fix Safari mobile background positioning */
  .intro::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(1, 11, 64, 0.7);
    z-index: 1;
  }

  /* Additional iOS 26 Safari fixes */
  .timeline-section {
    min-height: auto; /* Prevent timeline from forcing viewport height */
  }

  /* Ensure footer doesn't cause viewport issues */
  .footer {
    position: relative;
    z-index: 10;
  }

  /* Fix any potential scroll issues */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* ========== RESPONSIVE DESIGN ========== */

/* Mobile and Tablet - Show hamburger menu */
@media (max-width: 1023px) {
  /* Hide desktop nav, show mobile toggle */
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* Show CV button in mobile menu only */
  .cv-btn-header {
    display: none;
  }

  /* Mobile and Tablet Devices (≤1023px) */
  html {
    font-size: 16px; /* Better for mobile readability */
  }

  .page.wrapper {
    padding-top: 0;
    scroll-snap-type: y proximity; /* Better mobile scrolling */
  }

  .container,
  .containerintro,
  .containerproj,
  .containerheader,
  .footer-flex {
    padding: 0 24px; /* Slightly more padding for better touch targets */
    max-width: 100%;
  }

  .contact .container {
    padding: 0 24px;
    max-width: 100%;
  }

  /* Header adjustments */
  .header {
    padding: 12px 0;
    height: 75px; /* Larger for better touch targets */
    margin: 0;
    backdrop-filter: blur(15px); /* Enhanced blur for mobile */
  }

  .containerheader {
    align-items: center;
    justify-content: space-between;
    height: 100%;
  }

  .site-title {
    height: 24px;
    max-width: 85px;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
  }

  /* Mobile menu toggle styling */
  .menu-toggle {
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    padding: 12px; /* Larger touch target */
    margin: 0;
    height: 100%;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    min-width: 48px; /* Minimum touch target size */
    min-height: 48px;
  }

  .overlay-links li a {
    font-size: 2rem;
    padding: 16px 0; /* Better touch targets */
  }

  .close-menu {
    font-size: 2.8rem;
    top: 24px;
    right: 28px;
    padding: 12px;
    min-width: 48px;
    min-height: 48px;
  }

  /* Intro section - optimized for mobile with fixed background workaround */
  .intro {
    padding: 0;
    margin-top: 0;
    position: relative;
    /* Remove background properties - will use pseudo-element instead */
    color: var(--color-text);
    text-align: center; /* Center text on mobile */
    width: 100%;
    min-height: 100vh; /* Use min-height for better content flow */
    overflow: visible; /* Allow content to be visible */
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
  }

  /* Fixed background using pseudo-element for mobile */
  .intro::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("images/background/2202-0025_RVFX_2110_ShapeGradientLoopBackgrounds_A03A_Neg_Orange_Purple_F001_STILL.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
  }

  /* Remove margin from all intro sections except the first one */
  .intro:not(:first-of-type) {
    margin-top: 0;
  }

  /* First intro section - no margin, let header overlay */
  .intro:first-of-type {
    margin-top: 0;
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 20px; /* More breathing room */
  }

  .intro::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(
      1,
      11,
      64,
      0.75
    ); /* Slightly more overlay for better text readability */
    z-index: 1;
  }

  .intro .containerintro {
    position: relative;
    z-index: 2;
    flex-direction: column;
    gap: 30px; /* Better spacing */
    padding: 20px;
    text-align: center;
    max-width: 90%; /* Better width control */
    margin: 0 auto;
  }

  .profile {
    max-width: 250px; /* Smaller for mobile to fit better */
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* Add shadow for depth */
  }

  .intro h2 {
    font-size: 2.2rem; /* Better size for mobile */
    line-height: 1.2;
    margin-bottom: 1.5rem;
    /* font-weight: 600; */
  }

  .intro p {
    font-size: 1.4rem; /* Better readability without being too large */
    line-height: 1.6;
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    font-weight: 400;
  }

  /* Button adjustments */
  .button1 {
    width: auto;
    min-width: 200px; /* Larger touch target */
    height: 56px; /* Larger for better touch */
    font-size: 18px; /* Larger font */
    margin: 20px auto;
    padding: 16px 32px;
    border-radius: 20px; /* More rounded */
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(39, 3, 166, 0.3); /* Add shadow */
  }

  /* Project cards - optimized mobile layout */
  .project-card {
    width: 100%;
    padding: 30px 20px; /* Better padding for mobile */
    height: auto;
    min-height: 100vh;
    max-width: 100%;
    position: relative;
    z-index: 10; /* Ensure projects appear above fixed intro background */
  }

  .project-content {
    flex-direction: column;
    padding: 20px;
    gap: 20px; /* Reduced gap between carousel and project info */
    max-width: 100%;
    height: auto;
  }

  .project-image {
    width: 100%; /* Take full width */
    max-width: 100%;
    height: 45vh; /* Give it a specific height to contain the carousel */
    min-height: 300px; /* Minimum height to ensure visibility */
    order: 1;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px; /* Add some padding for better spacing */
  }

  .carousel-container {
    width: 100%;
    height: 40vh; /* Fixed height for mobile */
    min-height: 250px; /* Ensure minimum height */
    overflow: hidden;
    position: relative;
  }

  .carousel-image {
    width: 100%;
    height: 100%; /* Fill the container height */
    object-fit: contain; /* Maintain aspect ratio while fitting in container */
    border-radius: 8px;
  }

  .carousel-dots {
    display: none; /* Hide dots on mobile */
  }

  .project-image img:not(.carousel-image) {
    max-height: 40vh; /* Better height for mobile */
    width: 100%;
    object-fit: contain;
    border-radius: 12px; /* Rounded corners */
  }

  .project-info {
    order: 2;
    padding: 0;
    gap: 8px; /* Reduced gap between title and description */
  }

  .project-title {
    font-size: 2rem; /* Better size for mobile */
    font-weight: 600;
  }

  .project-description {
    font-size: 1.1rem; /* Better readability */
    line-height: 1.4;

    color: var(--color-text-secondary);
  }

  .tech-stack {
    gap: 5px; /* Better spacing */
    margin: 0.5rem 0;
    justify-content: center;
  }

  .tech-tag {
    font-size: 0.9rem; /* Better size for mobile */
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 500;
    background-color: rgba(39, 3, 166, 0.3); /* Better visibility */
  }

  .project-links {
    flex-direction: row;
    gap: 16px; /* Better spacing */
    justify-content: center;
  }

  .demo-link {
    width: auto;
    min-width: 160px; /* Larger touch target */
    text-align: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
  }

  /* Timeline section - optimized mobile layout */
  .timeline-section {
    padding: 80px 0 60px 0; /* Better padding */
    position: relative;
    z-index: 10; /* Ensure timeline appears above fixed intro background */
    scroll-snap-align: start; /* Keep snap alignment but with proximity scrolling */
    scroll-margin-top: 50px; /* Smaller margin for gentler snapping */
  }

  .timeline-title {
    font-size: 2rem; /* Better size for mobile */
    margin-top: 20px;
    margin-bottom: 3rem;
    font-weight: 600;
  }

  .timeline {
    padding: 0 20px;
  }

  .timeline::before {
    left: 20px; /* Align with padding */
    transform: none;
    width: 3px; /* Slightly thinner */
  }

  .timeline-item {
    margin-bottom: 1.5rem; /* Better spacing */
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 50px; /* Better space from timeline */
    margin-right: 0;
    text-align: left;
  }

  .timeline-dot {
    left: 10px; /* Align with timeline */
    transform: none;
    width: 16px; /* Better size */
    height: 16px;
    border: 3px solid var(--color-bg-primary);
  }

  .timeline-content {
    padding: 20px; /* Better padding for mobile */
    margin: 0;
    border-radius: 12px; /* More rounded */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
  }

  .timeline-role {
    font-size: 1.4rem; /* Better size for mobile */
    margin-bottom: 0.6rem;
    font-weight: 600;
  }

  .timeline-description {
    font-size: 1rem; /* Better readability */
    line-height: 1.7; /* Increased for better mobile readability */
    margin-bottom: 1.2rem;
    color: var(--color-text-secondary);
    text-align: left; /* Left align on mobile for better readability */
    hyphens: auto; /* Better word breaking on mobile */
    word-spacing: 0.03em; /* Slightly tighter word spacing on mobile */
  }

  .skill-tag {
    font-size: 0.8rem; /* Better size for mobile */
    padding: 8px 14px; /* Increased padding for better mobile touch targets */
    margin: 2px;
    border-radius: 18px; /* Slightly more rounded */
    font-weight: 500;
    letter-spacing: 0.01em; /* Tighter letter spacing on mobile */
    line-height: 1.1; /* Tighter line height for mobile */
    white-space: nowrap; /* Prevent wrapping */
  }

  /* Contact section - simplified mobile layout */
  .contact {
    padding: 40px 0; /* Reduced padding for better viewport fit */
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    background-color: var(--color-bg-primary);
  }

  .contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Reduced gap between title and form */
    width: 100%;
    /* max-width: 400px; */
    padding: 0 20px;
    margin: 0 20px;
  }

  #contacttitle {
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0; /* Remove margins, let container gap handle spacing */
    padding: 0;
    font-weight: 600;
    transition: none; /* Remove title animation for mobile */
    text-align: center;
  }

  #contact-form {
    margin: 0; /* Remove margins */
    width: 100%;
    max-width: 100%;
    padding: 12px 10px; /* Reduced padding for more compact form */
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Add gap between form elements */
    opacity: 1; /* Always visible on mobile */
    visibility: visible;
  }

  .form-row {
    flex-direction: column;
    gap: 8px; /* Further reduced gap for compact layout */
    width: 100%;
  }

  .form-group {
    width: 100%;
    min-width: 100%;
    margin: 0;
    gap: 3px; /* Even tighter gap for compact layout */
  }

  label {
    font-size: 0.85rem; /* Smaller for compact layout */
    font-weight: 600;
    padding: 0;
    margin-bottom: 3px; /* Further reduced margin */
    color: var(--color-text);
    letter-spacing: 0.01em; /* Better letter spacing */
  }

  input,
  textarea {
    width: 100%;
    padding: 12px 10px; /* More compact padding */
    font-size: 16px; /* Maintain 16px to prevent zoom on iOS */
    margin: 0;
    border-radius: 6px; /* Less rounded for compact look */
    border: 2px solid var(--color-accent-1);
    background-color: rgba(1, 11, 64, 0.4); /* Better contrast */
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure proper box sizing */
  }

  input:focus,
  textarea:focus {
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 4px rgba(39, 3, 166, 0.2);
    background-color: rgba(1, 11, 64, 0.5);
  }

  textarea {
    min-height: 80px; /* More compact height */
    resize: vertical;
    line-height: 1.4; /* Tighter line height */
  }

  #sendmessage {
    width: 100%;
    margin: 12px 0 0 0; /* Further reduced top margin */
    padding: 12px 14px; /* More compact padding */
    font-size: 15px; /* Slightly smaller font */
    font-weight: 600;
    border-radius: 6px; /* Less rounded for compact look */
    background-color: var(--color-highlight);
    border: none;
    box-shadow: 0 3px 10px rgba(39, 3, 166, 0.3);
    transition: all 0.3s ease;
    min-height: 44px; /* Minimum touch target */
  }

  #sendmessage:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 3, 166, 0.4);
  }

  .form-status {
    font-size: 1rem; /* Larger status text */
    padding: 12px;
    margin: 12px 0;
    border-radius: 8px;
    font-weight: 500;
  }

  /* Footer improvements */
  .footer {
    padding: 24px 0; /* More padding */
    height: auto;
    min-height: auto;
    background-color: rgba(1, 11, 64, 0.95); /* Enhanced background */
    position: relative;
    z-index: 10; /* Ensure footer appears above fixed intro background */
  }

  .footer-flex {
    gap: 24px; /* More spacing */
    padding: 0 24px;
    font-size: 0.5rem;
  }

  .footer-text {
    font-size: 0.8rem; /* Larger text */
    font-weight: 500;
  }

  .social-links {
    justify-content: center;
    gap: 24px; /* More spacing */
  }

  .foot-icon {
    height: 18px; /* Smaller icons for mobile */
    width: 18px;
    transition: all 0.3s ease;
    /* Safari-specific fixes */
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden; /* Fix Safari rendering issues */
    backface-visibility: hidden;
    /* Remove filter to prevent Safari sizing issues */
    opacity: 1;
  }

  /* Ensure form is scrollable on mobile if needed */
  #contact-form.visible {
    opacity: 1;
    transform: none; /* Override desktop transform for mobile */
    visibility: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 80vh; /* Prevent form from being too tall */
  }

  /* Hide the show form button on mobile since form is always visible */
  #show-form {
    display: none;
  }

  /* Mobile placeholder styling */
  input::placeholder,
  textarea::placeholder {
    font-size: 16px; /* Larger font size for better mobile readability */
    color: rgba(255, 255, 255, 0.7); /* Slightly more visible */
  }

  /* Additional mobile optimizations */
  .overlay-nav {
    backdrop-filter: blur(20px); /* Enhanced blur */
  }

  .overlay-links li {
    margin: 24px 0; /* More spacing between menu items */
  }

  /* Better touch feedback */
  .button1:active,
  .demo-link:active,
  .menu-toggle:active {
    transform: scale(0.95);
  }
}

/* Small Mobile Devices (<480px) */
@media (max-width: 479px) {
  html {
    font-size: 13px;
  }

  .container,
  .containerintro,
  .containerproj,
  .containerheader,
  .footer-flex {
    padding: 0 15px;
  }

  .contact .container {
    padding: 0 15px;
  }

  /* Header adjustments for small mobile */
  .header {
    padding: 12px 0;
    height: 65px;
  }

  .containerheader {
    height: 100%;
  }

  .site-title {
    height: 20px;
    max-width: 70px;
    height: 100%;
  }

  .menu-toggle {
    font-size: 1.8rem;
    padding: 6px;
    height: 100%;
  }

  /* Intro section adjustments */
  .intro {
    padding: 0;
    margin-top: 0; /* Remove margin to prevent gaps */
    height: 100vh; /* Full viewport height */
  }

  /* Remove margin from all intro sections except the first one */
  .intro:not(:first-of-type) {
    margin-top: 0;
  }

  /* Add margin only to the first intro section to account for header */
  .intro:first-of-type {
    margin-top: 0;
    min-height: 100vh; /* Full viewport height */
    padding-top: 0; /* Remove padding to align correctly */
    padding-bottom: 10px; /* Add bottom padding for breathing room */
  }

  .intro .containerintro {
    gap: 25px;
    padding: 15px;
    max-width: 500px;
    margin-top: 0;
  }

  .profile {
    max-width: 180px;
  }

  .intro h2 {
    font-size: 2.2rem;
  }

  .intro p {
    font-size: 1.3rem;
  }

  /* Button adjustments */
  .button1 {
    min-width: 160px;
    height: 45px;
    font-size: 15px;
    padding: 10px 20px;
  }

  /* Project cards adjustments */
  .project-card {
    padding: 30px 15px;
  }

  .project-content {
    padding: 15px;
    gap: 15px; /* Reduced gap for small mobile */
  }

  .project-image {
    width: 100%; /* Take full width */
    height: 40vh; /* Smaller height for small mobile */
    min-height: 250px; /* Smaller minimum height */
    padding: 0 15px; /* Smaller padding for small mobile */
  }

  .carousel-container {
    height: 35vh; /* Slightly smaller height for small mobile */
    min-height: 200px; /* Smaller minimum height */
    margin-bottom: -10px;
    margin-top: 0;
  }

  .carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
  }

  .carousel-dots {
    display: none; /* Hide dots on small mobile */
  }

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

  .project-description {
    font-size: 1rem;
  }

  .tech-tag {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .project-links {
    gap: 12px;
  }

  .demo-link {
    min-width: 120px;
    padding: 10px 16px;
  }

  /* Timeline adjustments */
  .timeline-section {
    padding: 60px 0 40px 0;
    scroll-snap-align: start; /* Keep snap alignment but with proximity scrolling */
    scroll-margin-top: 40px; /* Smaller margin for gentler snapping on small mobile */
  }

  .timeline-title {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
  }

  .timeline {
    padding: 0 15px;
    margin-bottom: 120px;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 40px;
  }

  .timeline-dot {
    left: -10px;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-role {
    font-size: 1.3rem;
  }

  .timeline-description {
    font-size: 0.95rem; /* Slightly smaller for small mobile */
    line-height: 1.6; /* Tighter line height for small screens */
    text-align: left;
    hyphens: auto;
    word-spacing: 0.02em; /* Tighter spacing for small screens */
  }

  .skill-tag {
    font-size: 0.75rem; /* Slightly smaller for small mobile */
    padding: 6px 10px; /* Smaller padding for small mobile */
    border-radius: 16px; /* Slightly less rounded for small screens */
    letter-spacing: 0.005em; /* Minimal letter spacing for small screens */
    line-height: 1.1;
    white-space: nowrap;
  }

  /* Contact section adjustments - simplified small mobile */
  .contact {
    padding: 30px 0; /* Reduced padding for better viewport fit */
  }

  .contact .container {
    max-width: 350px; /* Smaller for small mobile */
    gap: 15px; /* Even smaller gap for small mobile */
    padding: 0 10px;
  }

  #contacttitle {
    font-size: 1.6rem; /* Slightly smaller for small mobile */
    margin-top: 15px;
    margin-bottom: 10px;
    padding: 0;
    transition: none; /* Remove title animation for small mobile */
  }

  #contact-form {
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 10px 8px; /* Even more compact padding for small mobile */
    display: flex;
    flex-direction: column;
    gap: 6px; /* Smaller gap between form elements */
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    opacity: 1; /* Always visible on small mobile */
    visibility: visible;
  }

  #contact-form.visible {
    opacity: 1;
    transform: none; /* Override desktop transform for small mobile */
    visibility: visible;
    margin-bottom: 0;
  }

  /* Hide the show form button on small mobile since form is always visible */
  #show-form {
    display: none;
  }

  /* Small mobile placeholder styling */
  input::placeholder,
  textarea::placeholder {
    font-size: 12px; /* Maintain larger font size for better mobile readability */
    color: rgba(255, 255, 255, 0.7); /* Slightly more visible */
  }

  .form-row {
    gap: 6px; /* Further reduced gap */
  }

  .form-group {
    gap: 2px; /* Minimal gap */
  }

  label {
    font-size: 1rem; /* Smaller label */
    margin-bottom: 4px;
    margin-top: 4px;
    margin-left: 4px;
  }

  input,
  textarea {
    padding: 10px 8px; /* Ultra compact padding */
    font-size: 16px; /* Maintain 16px to prevent zoom */
  }

  textarea {
    min-height: 50px; /* Smaller textarea */
  }

  #sendmessage {
    padding: 10px 12px; /* Ultra compact padding */
    font-size: 14px; /* Smaller font */
    min-height: 42px; /* Minimum touch target */
  }

  .form-status {
    font-size: 0.9rem;
    margin: 1px;
  }

  /* Footer adjustments */
  .footer {
    padding: 15px 0;
  }

  .footer-flex {
    gap: 15px;
    padding: 0 15px;
  }

  .footer-text {
    font-size: 0.9rem;
  }

  .social-links {
    gap: 15px;
  }

  .foot-icon {
    height: 25px;
    width: 25px;
  }

  /* Overlay navigation adjustments */
  .overlay-links li a {
    font-size: 1.6rem;
  }

  .close-menu {
    top: 15px;
    right: 20px;
    font-size: 2.2rem;
  }
}

/* CV Download Section Styles */
.cv-download-section {
  width: 100%;
  padding: 80px 0;
  background: transparent;
  clear: both;
  display: block;
}

.cv-download-container {
  text-align: center;
  max-width: 100%;
  margin: 0 auto;
}

.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 15px;
  border: 2px solid var(--color-highlight);
  background-color: var(--color-accent-1);
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.cv-download-btn:hover {
  background-color: var(--color-highlight);
  transform: scale(1.05);
}

.cv-download-btn:active {
  transform: scale(0.98);
}

.cv-download-btn svg {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}
