/* Global smooth scroll */
html {
  scroll-behavior: smooth;
}
/* Offset content below fixed navbar */
main {
  margin-top: 80px;
}

/* Hero Section */
.hero {
  height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  text-align: center;
  position: relative;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.hero .btn {
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 14px 36px;
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--secondary-color);
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Hero button hover state */
.hero .btn:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  border-color: var(--accent-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #fff;
  animation: bounce 2s infinite;
}
.scroll-down::before {
  content: '\2193';
}

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

/* Timeline for Education */
.timeline {
  position: relative;
  list-style: none;
  padding: 20px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}
.timeline li {
  position: relative;
  width: 50%;
  padding: 20px 40px;
}
.timeline li:nth-child(odd) {
  left: 0;
  text-align: right;
}
.timeline li:nth-child(even) {
  left: 50%;
  text-align: left;
}
.timeline li::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--bg-color);
}
.timeline li:nth-child(odd)::before {
  right: -8px;
}
.timeline li:nth-child(even)::before {
  left: -8px;
}

/* Experience section timeline (alternate design) */
.experience-list {
  position: relative;
  list-style: none;
  padding-left: 20px;
  margin-top: 20px;
}
.experience-list::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}
.experience-list li {
  position: relative;
  margin-bottom: 30px;
  padding-left: 20px;
}
.experience-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  border-radius: 50%;
}
.experience-list .exp-content h3 {
  margin: 0 0 5px;
}
.experience-list .exp-content span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 8px;
}
.experience-list .exp-content p {
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
}

/* Project hover effect */
.project-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-item:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Skills bar */
.skills-list {
  list-style: none;
  padding: 0;
}
.skills-list li {
  margin: 15px 0;
  width: 80%;
  max-width: 400px;
}
.skills-list span {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
}
.skill-bar {
  background-color: #ddd;
  border-radius: 20px;
  overflow: hidden;
  height: 10px;
}
.skill-progress {
  background-color: var(--primary-color);
  height: 100%;
  width: 0;
  transition: width 1.5s ease-in-out;
}
:root {
  --primary-color: #824c3a;
  --secondary-color: #bda287;
  --accent-color: #d3bc74;
  --text-color: #3d2c2b;
  --bg-color: #faf6f0;
  --light-bg: #f3eee5;
}

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

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}
/* Decorative gradient underline for navbar */
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

 .navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
 .logo:hover {
  color: var(--accent-color);
 }

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  color: var(--text-color);
  border-radius: 6px;
  transition: color 0.3s ease, background 0.3s ease;
}
 .nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
}
.nav-links a:hover {
  /* remove hover background */
  background-color: transparent;
  /* keep text color unchanged */
  color: var(--text-color);
}
 .nav-links a:hover::after {
  left: 0;
  width: 100%;
}
/* CV Download Button Styling in Navbar */
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  /* margin-left removed: spacing uniform via nav-links li */
  border: 2px solid var(--accent-color);
  border-radius: 25px;
  color: var(--accent-color);
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
}
.cv-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.section {
  padding: 60px 0;
}

.section:nth-child(even) {
  background-color: var(--light-bg);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.projects-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}
.projects-grid::-webkit-scrollbar {
  height: 8px;
}
.projects-grid::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 4px;
}
.projects-grid::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}
/* Project cards for horizontal scroll */
/* Project cards for horizontal scroll */
.project-item {
  flex: 0 0 300px;
  scroll-snap-align: start;
}
/* Project card base styling */
.projects-grid .project-item {
  display: block;
  background-color: var(--bg-color);
  padding: 20px;
  border: 1px solid var(--light-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Contact info styling */
.contact-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease;
}
.contact-card svg {
  width: 28px;
  height: 28px;
  fill: var(--primary-color);
  transition: fill 0.3s ease;
}
.contact-card:hover {
  color: var(--primary-color);
}
.contact-card:hover svg {
  fill: var(--accent-color);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  justify-content: center;
}

.skills-list li {
  background-color: var(--light-bg);
  padding: 10px 15px;
  margin: 10px;
  border-radius: 20px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-color);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.form-group {
  position: relative;
  margin-bottom: 30px;
}

 .form-group label {
  position: absolute;
  top: 18px;
  left: 12px;
  background-color: var(--bg-color);
  padding: 0 4px;
  color: #888;
  font-size: 1rem;
  pointer-events: none;
  transition: 0.3s ease all;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--light-bg);
  border-radius: 4px;
  background-color: var(--bg-color);
  padding: 20px 12px 12px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
/* Disable textarea resizing */
.form-group textarea {
  resize: none;
}
/* Floating label interactions */
.form-group input:focus,
.form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
  border-color: var(--primary-color);
}
 .form-group input:focus + label,
 .form-group textarea:focus + label,
 .form-group input:not(:placeholder-shown) + label,
 .form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 8px;
  font-size: 0.85rem;
  color: var(--primary-color);
}

.btn {
  background-color: var(--primary-color);
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent-color);
}

/* Contact section animations */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Input focus and label animations */
.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--primary-color);
  outline: none;
}
.form-group input:focus + label,
.form-group textarea:focus + label {
  top: -18px;
  font-size: 0.85rem;
  color: var(--primary-color);
}

footer {
  background-color: var(--bg-color);
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid var(--light-bg);
}
/* Footer content layout */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Social icons styling */
.social-icons {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}
.social-icons a svg {
  width: 24px;
  height: 24px;
  fill: var(--text-color);
  transition: fill 0.3s ease;
}
.social-icons a:hover svg {
  fill: var(--accent-color);
}

/* About section layout */
/* About section layout */
 .about-content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
 }
 /* Vertical separator between image and text */
.about-separator {
  width: 2px;
  background-color: var(--primary-color);
  opacity: 0.2;
  align-self: stretch;
  margin: 20px 0;
}

/* Image container for natural contrast */
.about-img {
  background-color: var(--bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  /* center image vertically within about-content flex container */
  align-self: center;
  width: 260px;
  height: 260px;
  flex: 0 0 260px;
}
.about-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.about-text {
  flex: 1 1 300px;
  max-width: 600px;
}
/* Align text to the top-left for elegance */
.about-text h2 {
  text-align: left;
  margin: 0 0 16px;
}
.about-text p {
  text-align: left;
  margin: 0;
}

/* Responsive about section */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    right: 0;
    top: 80px;
    background-color: var(--bg-color);
    flex-direction: column;
    width: 100%;
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  .nav-links li:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: block;
  }
  .menu-toggle:hover {
    color: var(--accent-color);
  }
  /* Override CV button styling for mobile menu to match other links */
  .nav-links .cv-btn {
    border: none !important;
    background: transparent !important;
    border-radius: 6px !important;
    padding: 8px 14px !important;
  }
  .nav-links .cv-btn:hover {
    background: transparent !important;
    color: var(--text-color) !important;
  }

  /* Responsive About section */
  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about-img {
    margin: 0 auto 20px;
  }
  .about-text {
    max-width: 100%;
  }
  .about-separator {
    display: none;
  }
  /* Fix navbar to top on mobile */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }
  /* Add offset for content below fixed navbar */
  main {
    margin-top: 80px;
  }
  /* Center text on mobile */
  .about-text h2,
  .about-text p {
    text-align: center;
  }
}
/* Offset content below fixed navbar */
main {
  margin-top: 80px;
}

/* new*/
/* Style for the University of Freiburg link */
/* Reusable class for Freiburg-style links */
.freiburg-link {
  color: #004B87; /* Dark blue matching Uni Freiburg's branding */
  text-decoration: none; /* Remove default underline */
  position: relative; /* For positioning the custom underline */
  transition: color 0.3s ease; /* Smooth color transition on hover */
}

.freiburg-link:after {
  content: ''; /* Create a pseudo-element for the underline */
  position: absolute;
  width: 100%;
  height: 2px; /* Sleek underline thickness */
  background-color: #004B87; /* Same dark blue for the underline */
  bottom: -2px; /* Position below the text */
  left: 0;
  transform: scaleX(0); /* Start with no width */
  transform-origin: bottom right;
  transition: transform 0.3s ease; /* Smooth animation for the underline */
}

.freiburg-link:hover:after {
  transform: scaleX(1); /* Expand underline on hover */
  transform-origin: bottom left;
}

.freiburg-link:hover {
  color: #003366; /* Slightly darker blue on hover for feedback */
}