/* Dark mode styles */
:root {
  --bg-color: #f9f9f9;
  --text-color: #222;
  --header-bg: #4CAFB2;
  --header-text: white;
  --tab-text: white;
  --accent-color: #3B8A8D;
  --card-bg: #f5f5f5;
  --card-shadow: rgba(0, 0, 0, 0.05);
  --footer-bg: #eee;
  --input-border: #4CAFB2;
  --input-focus: #3B9EA5;
  --toggle-bg: white;
  --toggle-color: #3B8A8D;
  --skill-advanced: #3B8A8D;
  --skill-intermediate: #5DBDC0;
  --skill-beginner: #8ED1D4;
  /* RGB equivalents for gradient and glass effects */
  --header-bg-rgb: 76, 175, 178;
  --accent-color-rgb: 59, 138, 141;
  --card-bg-rgb: 245, 245, 245;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --header-bg: #2a6365;
  --header-text: #f0f0f0;
  --tab-text: #f0f0f0;
  --accent-color: #5DBDC0;
  --card-bg: #2c2c2c;
  --card-shadow: rgba(0, 0, 0, 0.2);
  --footer-bg: #222;
  --input-border: #5DBDC0;
  --input-focus: #4CAFB2;
  --toggle-bg: #333;
  --toggle-color: #f0f0f0;
  --skill-advanced: #5DBDC0;
  --skill-intermediate: #3B8A8D;
  --skill-beginner: #2a6365;
  /* RGB equivalents for gradient and glass effects */
  --header-bg-rgb: 42, 99, 101;
  --accent-color-rgb: 93, 189, 192;
  --card-bg-rgb: 44, 44, 44;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
  }
  header {
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--accent-color) 100%);
    color: var(--header-text);
    padding: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  /* Add a subtle shine overlay to header */
  header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 25%,
      transparent 50%
    );
    transform: rotate(30deg);
    pointer-events: none;
  }
  
  /* Header scroll effect - initial state */
  header.scrolled {
    background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(var(--header-bg-rgb), 0.85) 100%
    );
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  
  /* Adjust text color when header is scrolled */
  header.scrolled h1,
  header.scrolled p {
    color: var(--accent-color);
  }
  
  /* Dark mode adjustments for scrolled header */
  [data-theme="dark"] header.scrolled {
    background: linear-gradient(135deg,
      rgba(40, 40, 40, 0.95) 0%,
      rgba(var(--header-bg-rgb), 0.85) 100%
    );
  }
  
  [data-theme="dark"] header.scrolled h1,
  [data-theme="dark"] header.scrolled p {
    color: var(--header-text);
  }
  header h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  header p {
    margin-top: 0.25rem;
    font-size: 1.2rem;
    line-height: 0.8;
  }
  header .slogan {
    /* background-color: white;
    color: #4CAFB2; */
    font-family: 'Satisfy', cursive;
    font-weight: lighter;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    line-height: 1.6;
    padding: 0.2rem 0.5rem;
    margin: 0.5rem 0;
  }
 header .slogan-container {
    position: relative;
    padding: 0.5rem;
    perspective: 800px; /* Needed for 3D effect */
    overflow: visible;
  }
  header .slogan-animated {
    display: none;
  }

  .tabs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
  }
  .tab {
    background: linear-gradient(
      135deg,
      rgba(var(--header-bg-rgb), 0.85) 0%,
      rgba(var(--header-bg-rgb), 0.75) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--tab-text);
    font-size: 1.2rem;
    padding: 1.25rem 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent; /* Remove default mobile tap highlight */
    touch-action: manipulation; /* Optimize for touch */
    user-select: none; /* Prevent text selection on tap */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
  }
  
  /* Add subtle shine to tabs */
  .tab::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 30%,
      transparent 60%
    );
    transform: rotate(30deg);
    transition: transform 0.4s ease;
    pointer-events: none;
    opacity: 0.5;
  }

  .tab:hover,
  .tab.active {
    background: linear-gradient(
      135deg,
      rgba(var(--accent-color-rgb), 0.95) 0%,
      rgba(var(--accent-color-rgb), 0.85) 100%
    );
    color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
  }
  
  .tab:hover::after,
  .tab.active::after {
    transform: rotate(30deg) translateY(10%);
    opacity: 0.7;
  }

  @keyframes clickPulse {
    0% {
      transform: scale(1);
    }
    30% {
      transform: scale(1.05);
    }
    60% {
      transform: scale(0.98);
    }
    100% {
      transform: scale(1);
    }
  }

  .tab.clicked {
    animation: clickPulse 0.3s ease;
  }

  .tab-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    margin: 0 1rem;
  }

  .tab-content {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 0;
    right: 0;
    max-width: 700px;
    margin: 2rem auto;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 0 1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    transition: opacity 0.3s ease;
    height: 0;
    overflow: hidden;
  }

  .tab-content a {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: underline;
  }

  .tab-content a:hover {
    text-decoration: none;
  }

  .tab-content.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    height: auto;
    overflow: visible;
  }

  h2 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
  a {
    color: var(--accent-color);
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
  }
  footer {
    background-color: var(--footer-bg);
    font-size: 0.9rem;
    color: var(--accent-color);
    padding: 1.5rem;
    text-align: center;
  }
  
  .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .copyright {
    padding: 0.5rem;
  }
  img.profile-pic {
    width: 230px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    margin-top: 1rem;
    margin-bottom: 2rem;
    box-shadow:
      0 15px 35px rgba(0, 0, 0, 0.2),
      0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
  }
  
  /* Add subtle glow effect to profile pic */
  img.profile-pic::after {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(
      circle at center,
      rgba(var(--accent-color-rgb), 0.15) 0%,
      transparent 70%
    );
    z-index: -1;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  
  img.profile-pic:hover {
    transform: scale(1.02);
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.25),
      0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
  }
  
  img.profile-pic:hover::after {
    opacity: 1;
  }
  .portfolio-grid {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
    }
    .portfolio-item {
      width: calc(33.33% - 0.5rem);
      text-align: center;
      padding: 1rem;
      background: linear-gradient(
        145deg,
        var(--card-bg) 0%,
        color-mix(in srgb, var(--card-bg) 95%, white) 100%
      );
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow:
        0 10px 30px -5px rgba(0, 0, 0, 0.1),
        0 5px 15px -5px rgba(0, 0, 0, 0.05);
      transition: transform 0.3s, box-shadow 0.4s;
      -webkit-tap-highlight-color: transparent;
      position: relative;
      overflow: hidden;
    }
    
    /* Add subtle shine to cards */
    .portfolio-item::after {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 200%;
      height: 100%;
      background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
      );
      transform: skewX(-15deg);
      transition: transform 0.6s;
      pointer-events: none;
    }
    
    .portfolio-item:hover::after {
      transform: translateX(100%) skewX(-15deg);
    }
    
    .portfolio-item:hover, .portfolio-item:active {
      transform: translateY(-7px);
      box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.2),
        0 10px 20px -5px rgba(0, 0, 0, 0.1);
    }
  
  .portfolio-item h3 {
    color: var(--accent-color);
    margin: 0.5rem 0;
    font-size: 1.1rem;
  }
  
  .project-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    line-height: 1.5;
    opacity: 0.9;
  }
  
  .bubble-image {
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .bubble-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Lazy loading animation */
  img[loading="lazy"] {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .impressum{
      margin-left: 20px;
      background-color: var(--accent-color);
      color: white;
      padding: 0.5rem 1rem;
      border-radius: 5px;
      text-decoration: none;
      border: 1px solid var(--accent-color);
      font-weight: bold;
      display: inline-block;
      transition: all 0.3s ease;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .impressum:hover {
      background-color: color-mix(in srgb, var(--accent-color) 80%, white);
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      text-decoration: none;
  }
  .theme-toggle-left {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    background: var(--toggle-bg);
    color: var(--toggle-color);
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 2px 4px var(--card-shadow);
    transition: background-color 0.3s, color 0.3s;
  }
  
  .lang-toggle-right {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--toggle-bg);
    color: var(--toggle-color);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .lang-label {
    font-size: 0.8rem;
    font-weight: bold;
  }

  .loading {
    width: 24px;                   /* Width of the loading icon */
    height: 24px;                  /* Height of the loading icon */
    border: 3px solid rgba(243, 243, 243, 0.3);     /* Light border with transparency */
    border-top: 3px solid var(--accent-color); /* Use theme accent color */
    border-radius: 50%;            /* Make it circular */
    animation: spin 1s linear infinite; /* Spin animation */
    display: inline-block;          /* Inline to align with the button */
    margin-left: 10px;             /* Space between button and icon */
    vertical-align: middle;        /* Better alignment with button text */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    position: relative;            /* For z-index */
    z-index: 10;                   /* Ensure it's above other elements */
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Adjust loading icon for mobile devices */
  @media (max-width: 480px) {
    .loading {
      width: 28px;                /* Larger on mobile for better visibility */
      height: 28px;
      margin-left: 15px;          /* More spacing on mobile */
      border-width: 4px;          /* Thicker border on mobile */
    }
  }

  /* Media queries for responsive design */
  /* Medium screens */
  @media (max-width: 768px) and (min-width: 481px) {
    .tab-content {
      max-width: 100%;
      padding: 0 2rem;
    }
    .portfolio-item {
      width: calc(50% - 1rem); /* 2-column layout for medium screens */
    }
    img.profile-pic {
      width: 40%;
      height: auto;
      border-radius: 12px;
      border: 3px solid rgba(255, 255, 255, 0.25);
      box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    }
    .portfolio-pic {
      height: auto;
    }
    .tabs {
      flex-direction: column;
      gap: 10px; /* Add spacing between tabs */
    }
    .tab {
      padding: 1rem 0.75rem;
      font-size: 1rem;
      width: 80%; /* Make tabs wider on mobile */
      margin: 0 auto; /* Center the tabs */
    }
    .tab-separator {
      display: none;
    }
  }
  
  /* Small screens */
  @media (max-width: 480px) {
    /* Content container */
    .tab-content {
      max-width: 100%;
      padding: 0 1rem;
      margin-top: 1rem;
    }
    
    /* Header adjustments */
    header h1 {
      font-size: 2rem;
      margin-top: 2rem;
    }
    
    header p {
      font-size: 1rem;
    }
    
    header .slogan {
      font-size: 1.1rem;
      line-height: 1.6;
      padding: 0.2rem 0.5rem;
      margin: 0.5rem 0;
    }
    
    /* Navigation tabs */
    .tabs {
      flex-direction: column;
      gap: 12px;
      margin-top: 1rem;
      padding: 0.5rem 0;
    }
    
    .tab {
      padding: 0.85rem 0.5rem;
      font-size: 1rem;
      width: 90%;
      margin: 0 auto;
      min-height: 48px; /* Larger touch target size for better accessibility */
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* Make active tab more visible on mobile */
    .tab.active {
      background-color: var(--accent-color);
      transform: scale(1.05);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .tab-separator {
      display: none;
    }
    
    /* Profile picture */
    img.profile-pic {
      width: 60%;
      height: auto;
      margin-top: 0.5rem;
      margin-bottom: 1rem;
      border-radius: 12px;
      border: 3px solid rgba(255, 255, 255, 0.25);
      box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Portfolio items */
    .portfolio-item {
      width: 100%; /* Full width for very small screens */
      margin-bottom: 1rem;
      padding: 1.25rem;
      min-height: 44px; /* Ensure minimum touch target size */
    }
    
    .portfolio-pic {
      height: auto;
    }
    
    /* Theme and language toggles */
    .theme-toggle-left, .lang-toggle-right {
      padding: 0.6rem;
      top: 0.5rem;
      min-width: 44px;
      min-height: 44px;
    }
    
    .theme-toggle-left {
      left: 0.5rem;
    }
    
    .lang-toggle-right {
      right: 0.5rem;
      padding: 0.6rem 0.8rem;
    }
    
    .lang-label {
      font-size: 0.7rem;
    }
    
    /* Adjust slogan animation for mobile */
    header .slogan-animated {
      left: 50%;
      transform: translateX(-50%);
    }
  }

  /* This section is consolidated with other media queries */
  
  #lang-toggle {
      position: absolute;
      top: 0.25rem;
      right: 0.25rem;
      opacity: 0.8;
      cursor: pointer;
  }
  
  #flag-icon {
      width: 30px;
      height: 20px;
      border-radius: 3px;
      vertical-align: middle;
  }

  #lang-dropdown {
      display: none;
  }

  #lang-toggle:hover::after {
   content: attr(data-tooltip);
   position: absolute;
   bottom: -25px;
   left: 50%;
   transform: translateX(-50%);
   background-color: #333;
   color: #fff;
   padding: 5px 10px;
   border-radius: 5px;
   font-size: 0.8rem;
   white-space: nowrap;
   z-index: 1;
}

form {
  max-width: 500px;
  margin: 1rem 0;
}

.form-submit {
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 1rem;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 16px; /* Prevent zoom on iOS */
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-appearance: none; /* Remove default styling on iOS */
  appearance: none;
  margin-bottom: 0.5rem;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--input-focus);
}

button[type="submit"] {
  background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color) 80%, black) 100%);
  color: var(--header-text);
  border: none;
  padding: 0.85rem 1.5rem;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 0.5rem;
  -webkit-appearance: none; /* Remove default styling on iOS */
  appearance: none;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Add shine effect to submit button */
button[type="submit"]::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    transparent 60%
  );
  transform: rotate(30deg);
  transition: transform 0.4s ease;
  pointer-events: none;
}

button[type="submit"]:hover::after {
  transform: rotate(30deg) translateY(10%);
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 110%, white) 0%, var(--accent-color) 100%);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.15),
    0 3px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

button[type="submit"]:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form validation and status message styles */
.error-message {
  color: #E4A56C;
  display: none;
  font-size: 0.9rem;
  display: none; /* Hidden by default, shown via JavaScript */
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(228, 165, 108, 0.1);
  border-radius: 5px;
  font-weight: 500;
}

.success-message {
  color: #4CAF50;
  font-size: 0.9rem;
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(76, 175, 80, 0.1);
  border-radius: 5px;
  font-weight: 500;
}

/* Completely remove all invalid styling - no visual indication */
input:invalid,
textarea:invalid,
.invalid-input,
input:invalid:focus,
textarea:invalid:focus,
.invalid-input:focus {
  border-color: rgba(var(--accent-color-rgb), 0.2) !important;
  background-color: var(--bg-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  outline: none !important;
}

/* Improve form inputs on mobile */
@media (max-width: 480px) {
  input, textarea, button[type="submit"] {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px;   /* Larger touch targets */
  }
  
  /* Increase spacing between form elements on mobile */
  .form-group {
    margin-bottom: 16px;
  }
  
  /* Make the status message more visible on mobile */
  #status {
    padding: 10px;
    font-size: 14px;
    text-align: center;
  }
}
/* Skills section styling */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.skill-category {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    color-mix(in srgb, var(--card-bg) 95%, white) 100%
  );
  border-radius: 8px;
  padding: 1rem;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.1),
    0 5px 15px -5px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

/* Add subtle shine to skill categories */
.skill-category::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: transform 0.6s;
  pointer-events: none;
}

.skill-category:hover::after {
  transform: translateX(100%) skewX(-15deg);
}

.skill-category:hover {
  transform: translateY(-3px);
  box-shadow:
    0 15px 35px -10px rgba(0, 0, 0, 0.15),
    0 8px 18px -5px rgba(0, 0, 0, 0.08);
}

.skill-category h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: var(--accent-color);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-item {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
}

.skill-item.advanced {
  background-color: var(--skill-advanced);
}

.skill-item.intermediate {
  background-color: var(--skill-intermediate);
}

.skill-item.beginner {
  background-color: var(--skill-beginner);
}

@media (max-width: 768px) {
  .skills-container {
    gap: 1rem;
  }
  
  .skill-items {
    gap: 0.4rem;
  }
  
  /* Ensure touch targets are large enough */
  .skill-item {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.3rem;
  }
  
  .skill-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}
/* CV section styling */
.cv-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 1.5rem 0;
}

.cv-download {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    color-mix(in srgb, var(--card-bg) 95%, white) 100%
  );
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.1),
    0 5px 15px -5px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

/* Add subtle shine to cv-download */
.cv-download::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: transform 0.6s;
  pointer-events: none;
}

.cv-download:hover::after {
  transform: translateX(100%) skewX(-15deg);
}

.cv-download:hover {
  transform: translateY(-3px);
  box-shadow:
    0 15px 35px -10px rgba(0, 0, 0, 0.15),
    0 8px 18px -5px rgba(0, 0, 0, 0.08);
}

.cv-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, color-mix(in srgb, var(--accent-color) 80%, black) 100%);
  color: #ffffff !important; /* Fixed white color regardless of theme */
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 800; /* Extra bold */
  letter-spacing: 0.5px; /* Add letter spacing */
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Stronger text shadow for better readability */
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Add shine effect to CV button */
.cv-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    transparent 60%
  );
  transform: rotate(30deg);
  transition: transform 0.4s ease;
  pointer-events: none;
}

.cv-button:hover::after {
  transform: rotate(30deg) translateY(10%);
}

.cv-button:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 110%, white) 0%, var(--accent-color) 100%);
  color: #ffffff; /* Ensure text remains white on hover */
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); /* Enhance shadow on hover */
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.15),
    0 3px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px); /* Enhanced lift effect */
}

.cv-preview {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    color-mix(in srgb, var(--card-bg) 95%, white) 100%
  );
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.8rem;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.1),
    0 5px 15px -5px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

/* Add subtle shine to cv-preview */
.cv-preview::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: transform 0.6s;
  pointer-events: none;
}

.cv-preview:hover::after {
  transform: translateX(100%) skewX(-15deg);
}

.cv-preview:hover {
  transform: translateY(-3px);
  box-shadow:
    0 15px 35px -10px rgba(0, 0, 0, 0.15),
    0 8px 18px -5px rgba(0, 0, 0, 0.08);
}

.cv-preview h3 {
  color: var(--accent-color);
  margin-top: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--card-shadow);
  padding-bottom: 0.5rem;
}

.cv-item {
  display: flex;
  margin-bottom: 1.5rem;
}

.cv-year {
  flex: 0 0 100px;
  font-weight: bold;
  color: var(--text-color);
}

.cv-content {
  flex: 1;
}

.cv-content strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.cv-content p {
  margin: 0.25rem 0;
  color: var(--text-color);
  opacity: 0.8;
}

@media (max-width: 768px) {
  .cv-item {
    flex-direction: column;
  }
  
  .cv-year {
    margin-bottom: 0.5rem;
    flex: 0 0 auto;
  }
  
  .cv-button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Additional mobile optimizations for small screens */
@media (max-width: 480px) {
  /* Form elements */
  form {
    width: 100%;
  }
  
  input, textarea, button[type="submit"] {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.8rem;
  }
  
  button[type="submit"] {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  /* Footer and impressum button mobile styling */
  @media (max-width: 480px) {
    footer {
      padding: 1.5rem 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
    }
    
    .impressum {
      margin-left: 0;
      margin-top: 0.5rem;
      padding: 0.75rem 1.25rem;
      font-size: 0.9rem;
      width: 80%;
      text-align: center;
      display: block;
    }
  }
  
  /* Improve readability on small screens */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  /* CV section */
  .cv-download, .cv-preview {
    padding: 1rem;
  }
  
  .cv-item {
    margin-bottom: 1.2rem;
  }
  
  .cv-year {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }
  
  .cv-button {
    width: 100%;
    justify-content: center;
  }
  
  /* Skills section */
  .skill-category {
    padding: 0.75rem;
  }
  
  .skill-category h3 {
    font-size: 1rem;
  }
  
  /* Footer */
  footer {
    padding: 1.5rem 1rem;
  }
}
/* Theme icon display */
.theme-icon-light {
  display: block;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --header-bg: #2a6365;
  --header-text: #f0f0f0;
  --accent-color: #5DBDC0;
  --card-bg: #2c2c2c;
  --card-shadow: rgba(0, 0, 0, 0.2);
  --footer-bg: #222;
  --input-border: #5DBDC0;
  --input-focus: #4CAFB2;
}

/* Add subtle text shadow to headings in dark mode */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

header {
  background-color: var(--header-bg);
  color: var(--header-text);
}

h2, .tab-content a {
  color: var(--accent-color);
}

.project-description {
  color: var(--text-color);
}

.portfolio-item, .skill-category, .cv-download, .cv-preview {
  background-color: var(--card-bg);
  box-shadow: 0 2px 4px var(--card-shadow);
}

footer {
  background-color: var(--footer-bg);
}

input, textarea {
  background-color: var(--bg-color);
  color: var(--text-color);
  border-color: var(--input-border);
}

input:focus, textarea:focus {
  border-color: var(--input-focus);
}

.header-controls {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  display: flex;
  gap: 10px;
}

#theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-color);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] #theme-toggle {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
}

.theme-icon-light {
  display: block;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Enhanced Contact Section Styles */
.contact-section {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-intro {
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.9;
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Form Wrapper Styles */
.contact-form-wrapper {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    color-mix(in srgb, var(--card-bg) 95%, white) 100%
  );
  border-radius: 16px;
  padding: 1rem;
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.1),
    0 10px 20px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.contact-form-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), var(--header-bg));
  border-radius: 16px 16px 0 0;
}

.contact-form-wrapper:hover {
  transform: translateY(-5px);
  box-shadow:
    0 25px 50px -15px rgba(0, 0, 0, 0.15),
    0 15px 30px -10px rgba(0, 0, 0, 0.08);
}

.form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.form-header h3 {
  color: var(--accent-color);
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.form-decoration {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--header-bg));
  margin: 0 auto;
  border-radius: 2px;
}

/* Modern Form Styles */
.modern-form .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.label-icon {
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(var(--accent-color-rgb), 0.2);
  border-radius: 12px;
  font-size: 16px;
  background: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow:
    0 0 0 3px rgba(var(--accent-color-rgb), 0.1),
    0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.form-input:focus + .form-label .label-icon {
  transform: scale(1.1);
  color: var(--header-bg);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Enhanced Submit Button */
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--header-bg) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 20px rgba(var(--accent-color-rgb), 0.3),
    0 4px 10px rgba(0, 0, 0, 0.1);
}

.submit-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.submit-button:hover::before {
  left: 100%;
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 30px rgba(var(--accent-color-rgb), 0.4),
    0 6px 15px rgba(0, 0, 0, 0.15);
}

.submit-button:active {
  transform: translateY(-1px);
}

.button-icon {
  transition: transform 0.3s ease;
}

.submit-button:hover .button-icon {
  transform: translateX(3px);
}

/* Contact Info Card */
.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-card {
  background: linear-gradient(
    145deg,
    var(--card-bg) 0%,
    color-mix(in srgb, var(--card-bg) 95%, white) 100%
  );
  border-radius: 16px;
  padding: 2rem;
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.1),
    0 10px 20px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.contact-info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--header-bg), var(--accent-color));
  border-radius: 16px 16px 0 0;
}

.contact-info-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 25px 50px -15px rgba(0, 0, 0, 0.15),
    0 15px 30px -10px rgba(0, 0, 0, 0.08);
}

.contact-info-card h3 {
  color: var(--accent-color);
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(var(--accent-color-rgb), 0.05);
  border: 1px solid rgba(var(--accent-color-rgb), 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-method::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-color-rgb), 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.contact-method:hover::before {
  left: 100%;
}

.contact-method:hover {
  transform: translateX(5px);
  background: rgba(var(--accent-color-rgb), 0.08);
  border-color: rgba(var(--accent-color-rgb), 0.2);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-color), var(--header-bg));
  border-radius: 12px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.3);
  transition: all 0.3s ease;
}

.contact-method:hover .contact-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(var(--accent-color-rgb), 0.4);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.7;
  font-weight: 500;
}

.contact-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-link:hover {
  color: var(--header-bg);
  text-decoration: underline;
}

/* Response Time Indicator */
.response-time {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--accent-color-rgb), 0.1);
}

.response-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #4CAF50;
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design for Contact Section */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-form-wrapper,
  .contact-info-card {
    padding: 1.5rem;
  }
  
  .contact-method {
    padding: 0.75rem;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 1rem 0;
  }
  
  .contact-header {
    margin-bottom: 2rem;
  }
  
  .contact-intro {
    font-size: 1rem;
  }
  
  .contact-form-wrapper,
  .contact-info-card {
    padding: 1.25rem;
    border-radius: 12px;
  }
  
  .form-input {
    padding: 0.875rem;
  }
  
  .submit-button {
    padding: 0.875rem 1.5rem;
  }
  
  .contact-method {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .contact-details {
    align-items: center;
  }
}

.custom-link {
  text-decoration: none;
  color: inherit;
  display: block;
  font-weight: normal !important;
  width: 100%;
  height: 100%;
}

.custom-link:hover {
  text-decoration: none;
}

/* Portfolio items with links should look identical to non-linked items */
.portfolio-item .custom-link {
  text-decoration: none;
  color: inherit;
}

.portfolio-item .custom-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Only show link indication on hover through subtle visual cues */
.portfolio-item:hover .custom-link {
  cursor: pointer;
}

/* Add a subtle visual hint that this is clickable on hover */
.portfolio-item:hover .custom-link h3 {
  color: var(--header-bg);
  transition: color 0.3s ease;
}

.portfolio-item:hover .custom-link .project-description {
  opacity: 1;
  transition: opacity 0.3s ease;
}