/* --- General Styles & Variables --- */
:root {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --primary-color: #00ffcc; /* Neon teal */
  --primary-darker: #00cc99;
  --card-bg: #262626;
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  --font-body: 'Roboto Mono', monospace;
  --font-heading: 'Orbitron', sans-serif;
  --nav-height: 60px; /* Example variable */
  --border-radius: 10px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1em; /* Consistent spacing */
}

h1 { font-size: 3em; margin-top: 0; }
h2 { font-size: 2.5em; margin-top: 1.5em; text-align: center; }
h3 { font-size: 1.5em; margin-top: 1em; }

p {
  margin-bottom: 1em;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: var(--primary-darker);
  text-decoration: underline;
  outline: 2px solid var(--primary-darker); /* Focus outline */
   outline-offset: 2px;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* Remove bottom space */
}

button {
    font-family: inherit;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

button:hover, button:focus {
    transform: translateY(-2px); /* Subtle lift */
}

button:active {
    transform: translateY(0);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- Utility Classes --- */
.sr-only { /* For screen reader text */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button { /* Base button style */
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 500;
    text-decoration: none; /* Remove underline from link buttons */
    text-align: center;
}

.button:hover, .button:focus {
    background: var(--primary-darker);
    color: var(--text-color);
    text-decoration: none; /* Keep underline off */
    transform: translateY(-2px);
}

.button i { /* Icon spacing */
    margin-left: 8px;
    margin-right: -4px; /* Adjust if needed */
}

.tech-highlight {
    background-color: rgba(0, 255, 204, 0.1);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-weight: bold;
}

/* --- Header --- */
header {
  position: relative;
  text-align: center;
  padding: 100px 20px 50px; /* Adjust padding */
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow: hidden; /* Contain pseudo-elements */
}

/* Removed .tech-background div, using ::before instead */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: url('assets/tech-bg.jpg') no-repeat center center/cover; */
  opacity: 0.15; /* Adjusted opacity */
  z-index: 0;
}

.hero {
  position: relative; /* Ensure hero content is above ::before */
  z-index: 1;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  margin: 0 auto 25px auto; /* Center and add bottom margin */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover, .profile-img:focus {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--primary-color);
}

header h1 {
  margin-bottom: 10px;
}

.tagline {
  margin: 0 auto;
  font-size: 1.4em;
  color: var(--primary-color);
  max-width: 600px; /* Limit width for readability */
}

.social-links {
  margin-top: 25px;
}

.social-links a {
  color: var(--primary-color);
  margin: 0 12px;
  font-size: 1.8em;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block; /* Allows transform */
}

.social-links a:hover, .social-links a:focus {
  color: var(--primary-darker);
  transform: scale(1.1);
  text-decoration: none; /* No underline on icons */
   outline: none; /* Remove default focus outline for icons if desired */
}
.social-links a:focus-visible { /* Style focus specifically for keyboard nav */
   outline: 2px solid var(--primary-darker);
   outline-offset: 3px;
   border-radius: 50%;
}


/* --- Canvas Background --- */
#wireframe-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind all content */
  background: var(--bg-color);
}

/* --- Language Switcher --- */
.language-switcher {
  position: fixed; /* Keep it fixed */
  top: 20px;
  right: 20px; /* Moved to the right */
  z-index: 1010; /* Above nav */
  display: flex;
  gap: 8px;
}

.language-switcher button {
  background: rgba(38, 38, 38, 0.85);
  border: 1px solid rgba(0, 255, 204, 0.3);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.9em;
  font-weight: bold;
}

.language-switcher button:hover,
.language-switcher button:focus {
  background: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}

.language-switcher button.active {
  background: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
  cursor: default;
  transform: none; /* No hover effect when active */
}

/* --- Hamburger Menu Button --- */
.hamburger-menu {
  display: flex; /* Show hamburger always for toggle */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1010; /* Above nav */
  position: fixed;
  top: 20px;
  left: 20px;
}

.hamburger-menu .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Hamburger animation when open */
.hamburger-menu.open .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.open .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* --- Mobile Menu Container --- */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Full viewport height */
  background: rgba(26, 26, 26, 0.98); /* Darker overlay */
  z-index: 1005; /* Below hamburger, above content */
  display: flex; /* Use flex for centering */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  overflow-y: auto; /* Allow scrolling if content exceeds height */
  padding: 20px;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu nav {
    width: 100%;
    max-width: 400px; /* Limit width of menu block */
    text-align: center;
}

.mobile-menu ul#mobile-menu-list {
  padding: 0;
  margin: 0 0 30px 0; /* Space below menu */
}

.mobile-menu ul li {
  margin: 15px 0;
}

.mobile-menu ul li a {
  color: var(--primary-color);
  font-size: 1.6em; /* Larger text */
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 15px;
  display: block; /* Full width clickable */
  border-radius: 5px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a:focus {
  color: var(--bg-color);
  background-color: var(--primary-color);
  text-decoration: none;
}

.mobile-menu ul li a.active {
  color: var(--primary-darker);
  font-weight: bold;
  /* Maybe add a subtle background? */
   /* background-color: rgba(0, 255, 204, 0.1); */
}

/* Mobile Dropdown Styles */
.mobile-menu .dropdown .dropdown-toggle {
    position: relative; /* For arrow positioning */
}

.mobile-menu .dropdown .arrow {
    font-size: 0.6em;
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
    vertical-align: middle;
}
.mobile-menu .dropdown .dropdown-toggle.active .arrow {
    transform: rotate(180deg);
}

.mobile-menu .dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease;
  opacity: 0;
  margin-top: 0;
  padding-left: 0; /* Remove indent */
  background-color: rgba(0, 0, 0, 0.2); /* Subtle background for dropdown area */
  border-radius: 5px;
}

.mobile-menu .dropdown-menu.active {
  max-height: 300px; /* Adjust as needed */
  opacity: 1;
  margin-top: 10px;
}

.mobile-menu .dropdown-menu li {
    margin: 0; /* Reset margin */
}

.mobile-menu .dropdown-menu li a {
  font-size: 1.2em; /* Smaller font size for sub-items */
  padding: 8px 20px;
  text-transform: none; /* Normal case */
  color: var(--text-color); /* Different color for sub-items */
}

.mobile-menu .dropdown-menu li a:hover,
.mobile-menu .dropdown-menu li a:focus {
  color: var(--bg-color);
  background-color: var(--primary-darker); /* Darker teal for sub-hover */
}

.mobile-menu .dropdown-menu li a.active {
    color: var(--primary-color); /* Highlight active sub-item */
    font-weight: bold;
     background-color: transparent;
}


/* Scroll Hint Textbox */
#scroll-hint,
#scroll-hint-de {
  display: none; /* Hidden by default, shown by JS */
  position: absolute; /* Position relative to mobile menu container */
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(38, 38, 38, 0.95);
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  text-align: center;
  z-index: 1006; /* Above menu background */
  box-shadow: var(--card-shadow);
  white-space: nowrap;
}


/* --- Main Content --- */
main {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; /* Ensure content is above background */
  z-index: 1;
}

section {
  margin-bottom: 60px;
}

/* Content Grids (Used for experience, education, highlights, portfolio) */
.content-grid {
  display: grid;
  gap: 30px; /* Increased gap */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); /* Responsive columns */
}

.content-grid.single-column {
    grid-template-columns: minmax(min(100%, 500px), 1fr); /* Single column centered */
    justify-content: center; /* Center the single column */
}

.content-card,
.skill-card,
.portfolio-item {
  background: var(--card-bg);
  padding: 25px; /* Increased padding */
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 5px solid transparent; /* For subtle hover effect */
}

.content-card:hover,
.skill-card:hover,
.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border-left-color: var(--primary-color); /* Highlight border on hover */
}

/* Specific Card Content Styles */
.content-card h3 { margin-top: 0; }
.content-card .company, .content-card .institution { font-weight: bold; color: var(--text-color); }
.content-card .date { color: var(--primary-color); font-style: italic; }
.content-card ul { padding-left: 20px; list-style: disc; margin-top: 10px; }
.content-card ul li { margin-bottom: 8px; }

.info-list { padding-left: 0; list-style: none; }
.info-list li { margin-bottom: 10px; }
.info-list strong { color: var(--primary-color); }

/* Skills Section */
.skills-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.skill-card h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.skill-bar {
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  height: 12px; /* Slightly thicker bar */
  width: 100%;
}

.skill-progress {
  background: var(--primary-color);
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease-in-out; /* Animate width changes */
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Portfolio Section */
.portfolio-item h3 { margin-top: 0; }
.portfolio-item p { margin-bottom: 20px; min-height: 4.8em; /* Approx 3 lines */}

.project-link {
    margin-top: auto; /* Push button to bottom if cards have varying height */
}

/* Project Details Page (Pollarity/Spoti-fly) */
.project-details h2 { margin-bottom: 40px; }
.project-details .content-card { margin-bottom: 30px; } /* Space between cards */

.call-to-action h3 { color: var(--primary-darker); } /* Different color for CTA */

/* Spoti-fly Specific */
.playlist-section {
  text-align: center;
  padding: 40px 20px;
}

.playlist-description {
  font-size: 1.2em;
  margin-bottom: 25px;
  color: var(--text-color);
}

.get-playlist-button {
    font-size: 1.1em;
    padding: 12px 25px;
    margin-bottom: 30px;
}
.get-playlist-button i {
    margin-right: 10px;
    margin-left: -5px;
}

.playlist-embed {
  margin-top: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  min-height: 380px; /* Ensure space is reserved */
  background-color: var(--card-bg); /* Placeholder background */
  border-radius: 12px; /* Match Spotify embed */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.playlist-embed iframe {
    border-radius: 12px; /* Ensure iframe also has rounded corners */
}

#playlistPlaceholder,
#loadingIndicator,
#errorIndicator {
    color: var(--text-color);
    font-style: italic;
}

#errorIndicator p {
    color: #ff6b6b; /* Error color */
    font-weight: bold;
}

/* Simple Spinner for Loading */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 10px auto 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* --- Footer --- */
footer {
  text-align: center;
  padding: 30px 20px;
  background-color: var(--bg-color);
  color: var(--primary-color);
  margin-top: 80px;
  border-top: 1px solid rgba(0, 255, 204, 0.2); /* Subtle top border */
}

/* --- Media Queries for Responsiveness --- */

/* Show desktop nav and hide mobile toggle above tablet size */
@media (min-width: 769px) {
  .desktop-nav {
    display: block;
  }
  /* Keep hamburger visible for consistency or hide it */
  /* .hamburger-menu { display: none; } */
  /* .mobile-menu { display: none !important; } */ /* Ensure mobile menu is hidden */
}

/* Adjustments for smaller screens */
@media (max-width: 768px) {
  h1 { font-size: 2.5em; }
  h2 { font-size: 2em; }
  .tagline { font-size: 1.2em; }
  .social-links a { font-size: 1.6em; margin: 0 8px; }

  .content-grid {
      grid-template-columns: 1fr; /* Stack cards on smaller screens */
      gap: 20px;
  }

  .skills-grid {
      grid-template-columns: 1fr; /* Stack skills */
  }

  main {
      padding: 30px 15px;
  }

  header {
      padding: 80px 15px 40px;
  }

  .profile-img {
      width: 120px;
      height: 120px;
  }

  /* Ensure language switcher doesn't overlap hamburger */
  .language-switcher {
      top: 15px;
      right: 15px;
  }
  .hamburger-menu {
      top: 15px;
      left: 15px;
  }

  /* If desktop nav is kept on tablet, adjust its position/styling */
   /* body.scrolled .desktop-nav { ... } */
}

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    .tagline { font-size: 1.1em; }

    .mobile-menu ul li a { font-size: 1.4em; } /* Slightly smaller mobile menu text */
    .mobile-menu .dropdown-menu li a { font-size: 1.1em; }

    .get-playlist-button { font-size: 1em; padding: 10px 20px;}
}