/* ─── Fonts ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Gilroy";
  src: url("/fonts/Gilroy-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("/fonts/Gilroy-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ─── Custom properties ─────────────────────────────────────────────────── */

:root {
  --color-text:    #1c1c1b;
  --color-muted:   #6b6864;
  --color-accent:  #5a5856;
  --color-rule:    #d4cfc9;

  --overlay:       rgba(255, 255, 255, 0.62);
  --max-width:     680px;

  --spacing:       1.5rem;
  --font-body:     "Gilroy", "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tracking-caps: 0.14em;

  --dot-color:     #cc1111;
  --dot-size:      2em;
  --dot-offset:    -0.05em;
  --dot-h-offset:  -0.05em;

  --site-name-tracking: -0.03em;
  --header-height:      5rem;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */

html {
  font-size: 15px;
}

body {
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: url('/img/wallpaper_fine_light_greyscale.png');
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: left top;
  background-size: auto 100vh;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration-color: var(--color-rule);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-accent);
}

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

/* ─── Chrome: header / main / footer ────────────────────────────────────── */

header,
main,
footer {
  width: 100%;
  background-color: var(--overlay);
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

header {
  width: 100%;
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing);
}

.site-name {
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: var(--site-name-tracking);
  text-decoration: none;
}

.site-dot {
  color: var(--dot-color);
  font-size: var(--dot-size);
  line-height: 0;
  vertical-align: var(--dot-offset);
  position: relative;
  left: var(--dot-h-offset);
}

nav {
  display: flex;
  align-items: baseline;
  font-weight: 800;
}

nav a {
  font-size: 1rem;
  text-decoration: none;
}

nav a + a::before {
  content: "  ";
  color: var(--color-muted);
  padding-inline: 0.7em;
}

nav a.active {
  text-decoration: underline;
  text-decoration-color: var(--color-text);
  text-underline-offset: 3px;
}

/* ─── Main ───────────────────────────────────────────────────────────────── */

main {
  flex: 1;
  padding: 2rem 0;
}

.page-content {
  max-width: var(--max-width);
  margin-inline: auto;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

footer {
  width: 100%;
}

.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer a {
  font-size: 1rem;
  color: var(--color-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}

.footer-social svg {
  width: 15px;
  height: 15px;
}

.footer-links {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.footer-links a + a::before {
  content: "   ";
  padding-inline: 0.7em;
}

/* ─── Page (generic) ─────────────────────────────────────────────────────── */

.page {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

.page h1 {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  margin-bottom: calc(var(--spacing) * 2);
}

.page-content p,
.page-content li {
  margin-bottom: var(--spacing);
  max-width: 60ch;
}

.page-content h2 {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  margin-top: calc(var(--spacing) * 2);
  margin-bottom: var(--spacing);
}

/* ─── Vorträge ───────────────────────────────────────────────────────────── */

.talk-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 1.5);
}

.talk {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: var(--spacing);
  align-items: start;
}

.talk-date {
  font-size: 0.8rem;
  color: var(--color-muted);
  padding-top: 2px;
}

.talk-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.talk-title {
  font-size: 0.95rem;
}

.talk-event,
.talk-location {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.talk-slides {
  font-size: 0.8rem;
  color: var(--color-accent);
}

/* ─── Notizen ────────────────────────────────────────────────────────────── */

.note-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
}

.note {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: var(--spacing);
  align-items: baseline;
}

.note-date {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.note-title {
  font-size: 0.95rem;
}

/* ─── Contact form ───────────────────────────────────────────────────────── */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 1.25);
  max-width: 480px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.form-group input,
.form-group textarea {
/*  background: transparent; */
  opacity: 0.65;
  border: none;
  border-bottom: 1px solid var(--color-rule);
  padding: 0.4rem 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hp {
  display: none;
}

.form-dsgvo {
  font-size: 0.78rem;
  color: var(--color-muted);
  max-width: 48ch;
  line-height: 1.5;
}

.form-submit {
  align-self: flex-start;
  background-color: white;
  opacity: 0.5;
  border: 1px solid var(--color-text);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  cursor: pointer;
  color: var(--color-text);
  transition: border-color 0.15s, color 0.15s;
}

.form-submit:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.2rem;
}

.form-status.success { color: var(--color-accent); }
.form-status.error   { color: #b94040; }

/* ─── Hamburger toggle ───────────────────────────────────────────────────── */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}


/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (min-width: 720px) {
  html { font-size: 16px; }
}

@media (max-width: 640px) {
  nav#site-nav {
    display: none;
    position: absolute;
    font-weight: 800;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-rule);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
  }

  nav#site-nav.open {
    display: flex;
  }

  nav#site-nav a + a::before {
    content: none;
  }

  .nav-toggle {
    display: flex;
  }

  header {
    position: relative;
  }
}

@media (max-width: 480px) {
  .talk { grid-template-columns: 1fr; gap: 0.25rem; }
  .note { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ─── Portrait: rotated background ──────────────────────────────────────── */

@media (orientation: portrait) {
  body {
    background-image: none;
    background-color: transparent;
  }


  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 100vw;
    width: 100vh;
    height: 100vw;
    background-image: url('/img/wallpaper_fine_light_greyscale.png');
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: left top;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
    transform-origin: 0 0;
    transform: rotate(90deg);
  }
}
