/* ============================================================
   Paul Schöpfer – Website Stylesheet
   Minimal & Clean design
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --color-bg:         #ffffff;
  --color-bg-alt:     #f8f8f6;
  --color-text:       #1a1a1a;
  --color-text-muted: #6b7280;
  --color-accent:     #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border:     #e5e7eb;
  --color-tag-bg:     #eff6ff;
  --color-tag-text:   #1d4ed8;

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);

  --transition: 0.2s ease;

  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

/* ---- Layout ---- */
.container {
  width: min(1100px, 100% - 3rem);
  margin-inline: auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.3px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  text-decoration: none;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0 3rem;
  position: relative;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 5rem;
}

/* Photo */
.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--color-bg);
  outline: 2px solid var(--color-border);
}

.photo-placeholder {
  display: none;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 4px solid var(--color-bg);
  outline: 2px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -1px;
  user-select: none;
}

/* Text */
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.hero-degree {
  color: var(--color-text-muted);
  font-weight: 400;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 2.25rem;
  font-weight: 400;
}

.hero-note {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  margin: -1.25rem 0 1.75rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll hint */
.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 3rem;
}

.scroll-dot {
  animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   SECTIONS (shared layout)
   ============================================================ */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 4rem;
  align-items: start;
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-top: 2px solid var(--color-accent);
  padding-top: 0.6rem;
}

.section-label span:first-child {
  color: var(--color-accent);
  font-size: 0.9rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.75px;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

p + p { margin-top: 1rem; }

/* ============================================================
   CV SECTION
   ============================================================ */
.cv-block {
  margin-bottom: 2.5rem;
}

.cv-block-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.cv-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cv-item {}

.cv-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.cv-item-meta strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.cv-year {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cv-item-detail {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.cv-item-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
  line-height: 1.6;
}

/* ============================================================
   RESEARCH / PUBLICATIONS
   ============================================================ */
.pub-block {
  margin-top: 2.5rem;
}

.pub-block-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-list {
  list-style: none;
}

.pub-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-item:last-child { border-bottom: none; }

.pub-year {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

.pub-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.pub-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-top: 0.6rem;
}

.pub-links {
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.pub-links a {
  font-weight: 500;
}

.pub-block > p { margin-top: 1rem; }

.pub-status {
  color: var(--color-text-muted);
  font-style: italic;
}

/* Skills as a definition list */
.skills-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.skills-list dt {
  color: var(--color-text-muted);
  font-weight: 500;
}

.skills-list dd {
  color: var(--color-text);
  line-height: 1.6;
}

/* Plain contact block */
.contact-plain {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.contact-plain p + p { margin-top: 0.75rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  max-width: 400px;
  transition: all var(--transition);
  font-weight: 500;
}

.contact-item:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
  text-decoration: none;
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================================
   FADE-IN ANIMATION (triggered by JS IntersectionObserver)
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {

  /* Nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
  }

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

  .nav-links a {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

  .nav-links a::after {
    display: none;
  }

  /* Hero */
  .hero-inner {
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-note {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  margin: -1.25rem 0 1.75rem;
}

.hero-cta {
    justify-content: center;
  }

  .hero-photo,
  .photo-placeholder {
    width: 170px;
    height: 170px;
  }

  /* Sections */
  .section { padding: 4rem 0; }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .section-label {
    flex-direction: row;
    gap: 0.75rem;
    border-top: none;
    border-left: 2px solid var(--color-accent);
    padding-top: 0;
    padding-left: 0.75rem;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .skills-list {
    grid-template-columns: 1fr;
    gap: 0.2rem 0;
  }
  .skills-list dd { margin-bottom: 0.6rem; }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 1.9rem;
  }

  .hero-photo,
  .photo-placeholder {
    width: 140px;
    height: 140px;
  }

  .photo-placeholder {
    font-size: 2.2rem;
  }
}
