/* =========================
   Hannah Link — style.css (clean rewrite)
   ========================= */

:root {
  --bg: #f5f5f7;                 /* off-white background */
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --link: #1d4ed8;

  --max-width: 780px;
  --gutter: 1.25rem;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* =========================
   Header (kept as-is visually)
   ========================= */
header {
  background:
    linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
    url("header-forest.jpg") center/cover no-repeat;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  color: #f9fafb;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.tagline {
  font-size: 0.95rem;
  color: #e5e7eb;
  margin-top: 0.35rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.nav-links a { color: #e5e7eb; }
.nav-links a:hover { color: #ffffff; }

/* =========================
   Layout
   ========================= */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
}

.section { margin-bottom: 3rem; }

.section-intro {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0 0 1.25rem 0;
}

p {
  margin: 0 0 1rem 0;
  font-size: 0.98rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

/* =========================
   Headings (larger)
   ========================= */
h1 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  line-height: 1.1;
  margin: 0 0 1rem 0;
}

.section h2,
h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;          /* larger than before */
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1.25rem 0;
}

.section h3,
h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;         /* slightly larger */
  font-weight: 600;
  line-height: 1.25;
  margin: 1.6rem 0 0.5rem 0;
}

.subheading {
  margin-top: 1.5rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 1.08rem;
}

/* =========================
   Lists (default)
   ========================= */
ul {
  padding-left: 1.1rem;
  margin: 0 0 1rem 0;
}
li {
  margin-bottom: 0.45rem;
  font-size: 0.96rem;
}

/* =========================
   Publications (no indent + no bullets)
   ========================= */
#publications ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  margin-bottom: 1.1rem;
}
#publications li { margin: 0 0 0.85rem 0; }

/* =========================
   Research (remove emojis if present)
   ========================= */
#research .emoji { display: none !important; }
#research li::before { content: none !important; }

/* =========================
   About (image beside first text block, WITHOUT indent)
   Requires HTML like:
   <h2 class="about-title">About</h2>
   <div class="about-intro">
     <div class="about-photo"><img ...></div>
     <div class="about-intro-text"><p>...</p></div>
   </div>
   <p>Second paragraph...</p>
   ========================= */

/* Optional: if you use class="about-title" on the About h2 */
.about-title {
  font-size: 2.6rem;          /* make About headline a bit bigger */
  margin-bottom: 1.5rem;
}

/* This block keeps text aligned; image is positioned into the left margin */
.about-intro {
  position: relative;
  margin: 0 0 0 0;            /* no extra gap from the block itself */
  min-height: 170px;          /* reserves space so next paragraph doesn't jump up */
}

/* Image sits LEFT of the text column (outside the text flow) */
.about-intro .about-photo {
  position: absolute;
  left: -190px;               /* pushes image into the left margin area */
  top: 0;
  width: 170px;
}

.about-intro .about-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  object-fit: cover;
  object-position: top; /* NEU hinzugefügt */
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Text stays on the normal left edge (no indent) */
.about-intro .about-intro-text {
  margin: 0;
}

/* Remove the gap between intro paragraph and the next paragraph */
.about-intro .about-intro-text p { margin-bottom: 0; }
.about-intro + p { margin-top: 0; }

/* =========================
   Footer
   ========================= */
footer {
  text-align: center;
  padding: 1.5rem var(--gutter) 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 640px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links { justify-content: flex-start; }

  /* On mobile: place image above first paragraph (no negative left) */
  .about-intro {
    min-height: 0;
  }

  .about-intro .about-photo {
    position: static;
    width: 160px;
    margin: 0 0 0.75rem 0;
  }
}
