:root {
  --text-color: #3a6fd8;
  --link-color: #3a6fd8;
  --text-muted: #1f1f1f;
  --bg-color: #fffdf7;
}

body {
  margin: 0;
  padding: 3rem 8%;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.8;
  opacity: 0;
  animation: bodyFade 1.5s ease forwards;
}

@keyframes bodyFade {
  to { opacity: 1; }
}

/* homepage header */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.name a {
  font-size: 7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--link-color);
  transition: opacity 0.3s ease;
}
.name a:hover { opacity: 0.8; }

/* ===== Global Navbar Styling (bold + animated hover) ===== */
nav a {
  margin-left: 2.2rem;
  text-decoration: none;
  color: var(--link-color);
  font-size: 1.1rem;
  font-weight: 600; /* bold everywhere */
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
nav a:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: brightness(115%);
}

/* main body */
main {
  max-width: 720px;
  font-size: 1.05rem;
}
main p { margin: 1rem 0; }

/* fade-in text */
.fade-text {
  opacity: 0;
  transform: translateY(10px);
  animation: textFade 1s ease forwards;
}
.fade-text:nth-child(1) { animation-delay: 0.2s; }
.fade-text:nth-child(2) { animation-delay: 0.4s; }
.fade-text:nth-child(3) { animation-delay: 0.6s; }
.fade-text:nth-child(4) { animation-delay: 0.8s; }
.fade-text:nth-child(5) { animation-delay: 1s; }
.fade-text:nth-child(6) { animation-delay: 1.2s; }
.fade-text:nth-child(7) { animation-delay: 1.4s; }
.fade-text:nth-child(8) { animation-delay: 1.6s; }
.fade-text:nth-child(9) { animation-delay: 1.8s; }
.fade-text:nth-child(10) { animation-delay: 2s; }
.fade-text:nth-child(11) { animation-delay: 2.2s; }
.fade-text:nth-child(12) { animation-delay: 2.4s; }
.fade-text:nth-child(13) { animation-delay: 2.6s; }
.fade-text:nth-child(14) { animation-delay: 2.8s; }
.fade-text:nth-child(15) { animation-delay: 3s; }

@keyframes textFade {
  to { opacity: 1; transform: translateY(0); }
}

main a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}
main a:hover { opacity: 0.7; }

/* footer */
footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  color: var(--text-muted);
}
footer a {
  color: var(--link-color);
  text-decoration: none;
  margin-right: 1.5rem;
  transition: opacity 0.3s ease;
}
footer a:hover { opacity: 0.7; }

/* responsive */
@media (max-width: 768px) {
  body { padding: 2rem; }
  .name a { font-size: 4rem; }
  nav a { margin-left: 1rem; font-size: 1rem; }
  main { font-size: 1rem; }
}

/* project / research / lieb pages */
.project-page h2, .page-title {
  font-size: 5rem;
  font-weight: 700;
  color: var(--link-color);
  margin-bottom: 3rem;
}

.project {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.project h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--link-color);
}
.tags { margin: 1rem 0; }
.tags span {
  display: inline-block;
  background-color: rgba(58,111,216,0.08);
  color: var(--link-color);
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}
.view-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}
.view-link:hover { opacity: 0.7; }

/* ===== Subpage Navbar: right-aligned, unified typography ===== */
.subpage-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 1.2rem;
}

/* unified text style for nav and body */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600; /* bold match with home nav */
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-muted);
}

/* left-aligned name */
.nav-name {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}
.nav-name:hover { opacity: 0.6; }

/* right-aligned links */
.nav-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.nav-links a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--link-color);
  font-weight: 600;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
.nav-links a:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: brightness(115%);
}
.nav-links .active { opacity: 0.6; }

/* page title */
.page-title {
  margin-top: 2.5rem;
  font-size: 5rem;
  font-weight: 700;
  color: var(--link-color);
  margin-bottom: 3rem;
}

/* responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .nav-links a {
    margin-left: 1.2rem;
    font-size: 1rem;
  }

  .page-title {
    font-size: 3rem;
    margin-top: 2rem;
  }
}

/* ===== Footer Icon Styling ===== */
.social-icons {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.social-icons a img {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  filter: invert(37%) sepia(72%) saturate(372%) hue-rotate(192deg) brightness(90%) contrast(90%);
}

.social-icons a:hover img {
  opacity: 1;
  transform: scale(1.1);
  filter: invert(37%) sepia(100%) saturate(800%) hue-rotate(192deg) brightness(90%) contrast(95%);
}
/* ===== Publications Section ===== */

.publication {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* ← line between publications */
}
.publication:last-of-type {
  border-bottom: none;
}


.pub-meta {
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
}

.pub-type {
  font-weight: 600;
  color: var(--link-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

.pub-source {
  color: var(--link-color);
  font-weight: 500;
}

.pub-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--link-color);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.pub-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.pub-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(58, 111, 216, 0.3);
  transition: all 0.3s ease;
}

.pub-link:hover {
  color: var(--link-color);
  border-color: var(--link-color);
  opacity: 0.9;
  transform: translateX(3px);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .pub-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .pub-title {
    font-size: 1.3rem;
  }
}

/* ===== Liebesträume header + audio layout ===== */
.lieb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.lieb-header h1 {
  margin: 0;
  font-size: 5rem;
  font-weight: 700;
  color: var(--link-color);
}

/* Audio aligned right */
.audio-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  width: 280px; /* Adjust width */
}

/* Custom audio styling */
audio {
  width: 100%;
  height: 32px;
  border-radius: 20px;
  outline: none;
  -webkit-appearance: none;
}

/* Customize native audio controls */
audio::-webkit-media-controls-panel {
  background-color: rgba(58, 111, 216, 0.1);
  border-radius: 30px;
}

audio::-webkit-media-controls-play-button {
  background-color: var(--link-color);
  border-radius: 50%;
  transform: scale(0.9);
}

audio::-webkit-media-controls-timeline {
  color: var(--link-color);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: var(--link-color);
}

/* Hover effect like nav bar icons */
audio:hover::-webkit-media-controls-panel {
  background-color: rgba(58, 111, 216, 0.15);
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .lieb-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .audio-wrapper {
    width: 100%;
  }

  .lieb-header h1 {
    font-size: 3rem;
  }
}
/* ===== Floating audio (Liebesträume) ===== */
/* Fixed to top-right below nav bar and follows scroll */
.floating-audio {
  position: fixed;
  top: 100px;
  right: 8%;
  z-index: 1000;
  background: transparent; /* fully transparent */
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  transition: transform 0.2s ease;
}

.floating-audio:hover {
  transform: translateY(-1px);
}

.floating-audio audio {
  width: 260px;
  height: 32px;
  outline: none;
  border-radius: 20px;
}

/* WebKit player color tweaks */
.floating-audio audio::-webkit-media-controls-panel {
  background-color: rgba(58, 111, 216, 0.1);
  border-radius: 20px;
}
.floating-audio audio:hover::-webkit-media-controls-panel {
  background-color: rgba(58, 111, 216, 0.15);
}
.floating-audio audio::-webkit-media-controls-play-button {
  background-color: var(--link-color);
  border-radius: 50%;
  transform: scale(0.9);
}
.floating-audio audio::-webkit-media-controls-current-time-display,
.floating-audio audio::-webkit-media-controls-time-remaining-display {
  color: var(--link-color);
}

/* Mobile fallback: inline audio */
@media (max-width: 900px) {
  .floating-audio {
    position: static;
    right: auto;
    top: auto;
    margin-bottom: 1rem;
    box-shadow: none;
    background: transparent;
    border: 0;
    padding: 0;
    backdrop-filter: none;
  }

  .floating-audio audio {
    width: 100%;
  }
}
.pub-title,
.project h3 {
  color: #0b0b0b; /* true black for strong contrast */
}
