/* ============================================================
   Felix Wagner — Personal Homepage
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: #555;
  background: #fff;
  line-height: 1.7;
}

a {
  color: #2a6ebb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout ----------------------------------------------- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Navigation ------------------------------------------- */
nav {
  border-bottom: 1px solid #e0e0e0;
  background: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

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


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

.nav-links li {
  position: relative;
}

.nav-links a {
  display: block;
  padding: 0 1rem;
  height: 60px;
  line-height: 60px;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #2a6ebb;
  text-decoration: none;
}

/* Dropdown */
.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border: 1px solid #e0e0e0;
  border-top: 2px solid #2a6ebb;
  min-width: 220px;
  list-style: none;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-links .has-dropdown:hover .dropdown-menu {
  display: block;
}

.nav-links .dropdown-menu li a {
  height: auto;
  line-height: 1.5;
  padding: 0.6rem 1rem;
  text-transform: none;
  font-weight: 400;
  font-size: 0.875rem;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #555;
  transition: all 0.3s;
}

/* --- Page Header ------------------------------------------ */
.page-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #555;
}

/* --- Main Content ----------------------------------------- */
main {
  padding: 2rem 0 5rem;
}

main > .container {
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem 2rem 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* --- Home: Hero ------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding: 3.5rem 0 3rem;
}

.hero-text h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #555;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.hero-text .subtitle {
  font-size: 1.05rem;
  color: #888;
  margin-bottom: 1.8rem;
}

.hero-text p {
  margin-bottom: 1.2rem;
  font-size: 0.975rem;
}

.hero-portrait {
  width: 200px;
  flex-shrink: 0;
}

.hero-portrait img {
  border-radius: 4px;
  width: 200px;
  height: auto;
}

/* --- Sections --------------------------------------------- */
section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e8e8e8;
}

section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #555;
  margin: 1.5rem 0 0.5rem;
}

section p {
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

section ul, section ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

section li {
  margin-bottom: 0.4rem;
  font-size: 0.975rem;
}

/* --- Figure / Image blocks -------------------------------- */
.figure-block {
  margin: 2rem 0;
}

.figure-block.float-right {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 320px;
}

.figure-block.float-left {
  float: left;
  margin: 0 2rem 1.5rem 0;
  max-width: 320px;
}

.figure-block img {
  border-radius: 4px;
  width: 100%;
}

.figure-block figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.4rem;
  text-align: center;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* --- Two-image row ---------------------------------------- */
.img-row {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}

.img-row figure {
  flex: 1;
}

.img-row img {
  border-radius: 4px;
  width: 100%;
}

.img-row figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.4rem;
  text-align: center;
}

/* --- Publication entry ------------------------------------ */
.pub-entry {
  border-left: 3px solid #e0e0e0;
  padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
  background: #fafafa;
  border-radius: 0 4px 4px 0;
}

.pub-entry .pub-title {
  font-weight: 700;
  color: #555;
  font-size: 0.975rem;
  margin-bottom: 0.2rem;
}

.pub-entry .pub-authors {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.2rem;
}

.pub-entry .pub-journal {
  font-size: 0.875rem;
  color: #888;
  font-style: italic;
}

/* --- Talk entry ------------------------------------------- */
.talk-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
}

.talk-entry:last-child {
  border-bottom: none;
}

.talk-date {
  color: #888;
  white-space: nowrap;
  font-size: 0.875rem;
  padding-top: 0.1rem;
}

.talk-details strong {
  color: #555;
  font-weight: 600;
}

.talk-type {
  display: inline-block;
  font-size: 0.75rem;
  background: #eef2f8;
  color: #2a6ebb;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* --- CV entries ------------------------------------------- */
.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #555;
  border-bottom: 2px solid #e8e8e8;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.3rem 1.5rem;
  margin-bottom: 1.2rem;
}

.cv-dates {
  color: #888;
  font-size: 0.875rem;
  padding-top: 0.15rem;
}

.cv-body .cv-title {
  font-weight: 700;
  color: #555;
  font-size: 0.975rem;
}

.cv-body .cv-place {
  color: #666;
  font-size: 0.9rem;
}

.cv-body .cv-desc {
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

/* --- Footer ----------------------------------------------- */
footer {
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: #aaa;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

footer a {
  color: #888;
}

footer a:hover {
  color: #2a6ebb;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    width: 140px;
    order: -1;
  }

  .hero-portrait img {
    width: 140px;
    height: auto;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    z-index: 100;
  }

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

  .nav-links a {
    height: auto;
    line-height: 1.5;
    padding: 0.6rem 1.5rem;
  }

  .nav-links .dropdown-menu {
    position: static;
    display: none;
    border: none;
    border-top: none;
    box-shadow: none;
    padding-left: 1rem;
  }

  .nav-links .has-dropdown.open .dropdown-menu {
    display: block;
  }

  .nav-toggle {
    display: flex;
  }

  nav .container {
    flex-wrap: wrap;
    position: relative;
  }

  .cv-entry {
    grid-template-columns: 1fr;
  }

  .figure-block.float-right,
  .figure-block.float-left {
    float: none;
    max-width: 100%;
    margin: 1.5rem 0;
  }

  .img-row {
    flex-direction: column;
  }
}
