:root {
  --color-primary: rgb(62, 163, 41);
  --color-text: black;
  --color-background: rgb(255, 255, 255);
  --font-size-base: clamp(0.95rem, 0.7857rem + 0.1786vw, 1rem);
  --font-size-h1: var(--font-size-base);
  --font-size-h2: var(--font-size-base);
  --font-size-li: var(--font-size-base);
}

/* Body */
html, body {
  font-family: "helvetica-neue-lt-pro", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 130%;
  font-size: var(--font-size-base);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body.home {

  overflow: hidden !important;
  overscroll-behavior: none !important;
  -webkit-overflow-scrolling: none !important;
}

html.home {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  height: 100%;
}


*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Headings and paragraphs */

h1 {
  font-family: "helvetica-neue-lt-pro", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: var(--font-size-h1);
  margin: 0;
  text-decoration: underline;
}

h2 {
  font-family: "helvetica-neue-lt-pro", Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: var(--font-size-h2);
  margin: 0;
}

p {
  margin: 0;
  width: fit-content;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


nav {
  margin: 16px;
}

.main-nav ul li a {
  color: var(--color-primary);
}

.main-nav ul li a:hover {
  color: var(--color-primary);
}

a {
  color: var(--color-text);
  text-decoration: none;
  pointer-events: auto;
}

.additional-info a {
  color: var(--color-primary);
}

a:hover {
  text-decoration: underline;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  padding: 16px;
  display: inline-block;
}

.header a:hover {
  text-decoration: none;
}

.title {
  text-decoration: none;
  color: var(--color-text);
}

.main-content {
  width: 100%;
  margin: 64px 0 16px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.about-text {
  margin-top: 64px;
  padding: 0 16px;
  max-width: 70ch;
}

.nav-container {
  position: absolute;
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: constant(safe-area-inset-bottom);
}

/* Selected Work */

.work-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.work-image-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-image {
  display: block;
  max-width: 100%;
  max-height: calc(var(--app-height, 100dvh) - 100px);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.work-info {
  margin-top: 4px;
}

.work-title {
  font-style: italic;
}

.dimensions {
  white-space: nowrap;
}

.additional-title {
  margin-top: 16px;
}

.additional-info {
  margin-top: 16px;
}



.work-text {
  max-width: 75ch;
}

.work-fulltext {
  max-width: 75ch;
}

.hidden {
  display: none;
}

.read-more {
  text-decoration: underline;
  cursor: pointer;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--color-background);
  display: none;
  z-index: 9999;
  overflow: hidden;
}

#overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto !important; 
  overscroll-behavior: contain; 
  -webkit-overflow-scrolling: touch; 
}

.index-container {
  margin: 64px 0 16px;
  padding: 0 16px;
}

.overlay-btn,
.close-btn {
  position: fixed;
  top: 0;
  right: 0;
  border: none;
  padding: 16px;
  cursor: pointer;
  z-index: 10000;
}

.close-btn {
  display: none;
}

/* CV */
.cv-content {
  width: 100%;
  margin: 64px 0 16px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cv-block-entries {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Imprint */

.imprint-content {
  margin: 64px 0 16px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.imprint-section, .dsgvo-section {
  max-width: 75ch;
}

/* Word Physics Animation Canvas */
#animation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1000;
  background: transparent;
  pointer-events: none;
}

.word-span {
  display: inline-block;
  transition: transform 0.3s ease;
  transform-origin: center;
}

.physics-word {
  position: absolute;
  display: inline-block;
  margin: 0;
  padding: 0;
  transform-origin: center center;
  transition: none;
  will-change: transform; 
}

#debug-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
}



@media (max-width: 480px) {

  :root {
  --font-size-base: 0.925rem;
}


  nav ul li {
    margin-top: 2px;
  }
}


@media (max-width: 280px) {
  .dimensions {
    white-space: normal;
  }
}
