* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Steinerlight";
  src: url("../Font/Steinerlight.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Bahnschrift Light";
  src: url("../Font/BAHNSCHRIFT.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Bahnschrift";
  src: url("../Font/BAHNSCHRIFT.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: "Bahnschrift Light";
  background-color: #ffffff;
  color: #000000;
  overflow-y: auto; /* Allow scrolling */
  --dynamic-bg: url('../Mintak/háttér.jpg'); /* Original background */
}

/* Fixed Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--dynamic-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(15px);
  z-index: -1;
}

/* Header (fixed at top, includes blur effect) */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: transparent;
  z-index: 1000;
  backdrop-filter: blur(10px); /* Adds blur to the content underneath */
  -webkit-backdrop-filter: blur(10px); /* For Safari support */
}

/* Header container grid structure */
.header-container {
  display: grid;
  grid-template-columns: auto 1fr auto auto; /* Four columns: logo, nav menu, language switcher, social links */
  align-items: center;
  height: 80px;
  padding: 0 20px;
  background-color: transparent;
  position: relative;
}

/* Position the .logo off-grid */
.logo {
  position: absolute;
  top: 0; 
  left: 20px;
}

.logo img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-top: 0px;
  z-index: 1000;
  transition: all 0.3s ease; /* Smooth transition */
}

/* Smaller logo size on scroll */
.logo.shrink img {
  width: 80px;
  height: 80px;
  top: 0; /* Aligns with the header height */
}

/* Navigation Menu */
.nav-menu {
  grid-column: 2; /* Second column for the nav menu */
  justify-self: center; /* Center it horizontally within its column */
  display: flex;
  list-style: none;
  margin-left: 50px; /* Push slightly to the right if needed */
}

.nav-menu ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-menu ul li {
  margin: 0 20px;
}

.nav-menu ul li a {
  text-decoration: none;
  color: #000;
  font-family: "Steinerlight";
  font-size: 24px;
  font-weight: bold;
  transition: font-size 0.3s ease, color 0.3s ease;
  letter-spacing: 3px;
}

.nav-menu ul li a.active {
  font-size: 24px;
  text-decoration: underline;
  color: #000;
}

.nav-menu ul li a:hover {
  font-size: 30px;
}

/* Language Switcher */
.language-switcher {
  grid-column: 3; /* Third column for the language switcher */
  display: flex;
  gap: 10px;
  align-items: center;
  justify-self: flex-end;
  margin-right: 15px;
}

.language-switcher .lang-option {
  text-decoration: none;
  font-size: 18px;
  font-family: "Steinerlight";
  font-weight: bold;
  color: #000;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.language-switcher .lang-option:hover {
  background-color: #f5f5f5;
  color: #333;
}

.language-switcher .lang-option.active {
  background-color: #fff;
  color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Social Links */
.social-links {
  grid-column: 4; /* Fourth column for social links */
  display: flex;
  gap: 15px;
  align-items: center;
  justify-self: flex-end;
}

.social-links .social-dot {
  font-size: 20px;
  color: #000000;
  text-decoration: none;
  transition: transform 0.3s;
}

.social-links .social-dot:hover {
  transform: scale(1.2);
}

/* Main Content Layout */
main {
  position: relative;
  top: 80px; /* Push below header */
  padding: 20px;
  z-index: 1;
}

.bio-container {
  display: flex;
  align-items: flex-start;
  padding: 100px 20px 50px; /* Added 150px top padding */
  gap: 40px; /* Increased gap between sections */
  width: calc(100% - 80px); /* Adjusted for new layout */
  margin: 0 auto;
}

/* Bio Left Section */
.bio-left {
  flex: 2;
  font-family: "Bahnschrift Light", Arial, sans-serif;
  color: #000000;
  line-height: 1.6;
  font-size: 18px;
  margin-right: 80px; /* Move text to the right */
}

.bio-left h1 {
  font-size: 42px;
  margin-bottom: 10px;
  font-weight: bold;
}

.bio-left h2 {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: bold;
}

.bio-left h3 {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: bold;
}

.bio-left p {
  font-size: 18px;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* Grid layout for items */
.bio-grid {
  display: grid;
  grid-template-columns: 100px 1fr; /* First column for year, second for details */
  gap: 10px 20px;
}

.bio-year {
  font-weight: bold;
  color: #333;
  text-align: right;
}

.bio-detail {
  color: #000;
}

/* Bio Right Section */
.bio-right {
  flex: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0px; /* Move image more to the right */
}

.portrait-container {
  color: #ffffff;
  height: 600px;
  width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-radius: 0px;
  position: fixed;
  margin-top: 500px;
}

.portrait-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Footer fixed at bottom */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #ffffff;
  color: #000000;
  text-align: center;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 999;
}
footer p {
  margin-bottom: 3px;
}
footer a {
  text-decoration: none;
  color: #000000;
  transition: color 0.3s;
}
footer a:hover {
  color: #888888;
}

/* Responsive Design */
@media (max-width: 1024px) {
  body {
    overflow-y: auto; /* Enable scrolling */
    --dynamic-bg: url('../Mintak/háttér.jpg'); /* Background */
  }

  main {
    padding: 20px 15px;
    top: 70px; /* Push below adjusted header */
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    left: 100px; /* Adjust based on smaller logo */
    top: 25px; /* Center vertically */
    z-index: 1002;
  }

  .hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: #000;
    border-radius: 2px;
  }

  .bio-container {
    flex-direction: column;
    gap: 20px; /* Reduce gap between sections */
    padding: 50px 15px; /* Adjust padding */
  }

  .bio-left {
    font-size: 16px; /* Smaller text size */
    margin: 0; /* Remove margin */
    text-align: center; /* Center-align text */
  }

  .bio-left h1 {
    font-size: 32px; /* Adjust heading size */
  }

  .bio-left h2, .bio-left h3 {
    font-size: 20px; /* Smaller subheadings */
  }

  .bio-left p {
    font-size: 14px; /* Smaller paragraph text */
  }

  .bio-grid {
    display: grid;
    grid-template-columns: 100px 1fr; /* Keep year on the left */
    gap: 10px 20px;
    text-align: left; /* Align text left */
    margin: 20px auto;
  }

  .bio-year {
    text-align: right; /* Ensure year stays aligned to the right */
    font-weight: bold;
  }

  .bio-detail {
    font-size: 14px; /* Smaller detail text */
  }

  .bio-right {
    order: -1; /* Move image before "self-introduction" */
    margin: 0 auto; /* Center-align image */
    max-width: 300px; /* Restrict image container width */
  }

  .portrait-container {
    width: 100%;
    max-width: 300px; /* Set maximum width */
    height: auto; /* Automatically adjust height */
    margin: 20px auto; /* Add margin for spacing */
  }

  .portrait-container img {
    max-width: 100%;
    height: auto;
    border-radius: 0; /* No rounded corners */
  }

  .footer-container{
    font-size: 10px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  header {
    height: 70px; /* Smaller header */
    backdrop-filter: blur(10px); /* Blur effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    z-index: 1001; /* Ensure header stays on top */
  }

  .logo {
    left: 0px;
  }

  .logo img {
    width: 80px;
    height: 80px;
    left: 0px;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    left: 100px; /* Adjust based on smaller logo */
    top: 30px; /* Center vertically */
    z-index: 1002;
  }

  .hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: #000;
    border-radius: 2px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 70px; /* Below header */
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    padding: 15px 0;
    align-items: center;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu ul {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 15px;
  }

  .nav-menu ul li a {
    font-size: 18px;
  }

  main {
    padding: 15px 10px; /* Reduced padding */
    top: 60px; /* Adjust for smaller header */
  }

  .bio-container {
    padding: 30px 10px; /* Reduce padding */
    gap: 15px;
  }

  .bio-left {
    font-size: 14px; /* Further reduce text size */
    text-align: center; /* Center-align for better layout */
  }

  .bio-left h1 {
    font-size: 28px; /* Smaller heading */
  }

  .bio-left h2, .bio-left h3 {
    font-size: 18px; /* Smaller subheadings */
  }

  .bio-left p {
    font-size: 12px; /* Reduce paragraph size */
  }

  .bio-grid {
    display: grid;
    grid-template-columns: 100px 1fr; /* Keep year on the left */
    gap: 8px 15px; /* Tighten gaps */
    text-align: left;
    margin: 20px auto;
  }

  .bio-year {
    text-align: right; /* Ensure year stays aligned */
    font-weight: bold;
  }

  .bio-detail {
    font-size: 12px; /* Smaller detail text */
  }

  .bio-right {
    order: -1; /* Move image before "self-introduction" */
    margin: 0 auto;
    max-width: 250px; /* Smaller max width */
  }

  .portrait-container {
    width: 100%;
    position: relative;
    max-width: 250px; /* Set smaller maximum width */
    height: auto;
    margin: 15px auto; /* Adjust margin for spacing */
  }

  .portrait-container img {
    max-width: 100%;
    height: auto;
  }

  .footer-container{
    font-size: 10px;
  }
}
