/* ---------- Fonts ---------- */

@font-face {
  font-family: "Roboto Mono";
  src: url("../font/RobotoMono-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("../font/RobotoMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("../font/RobotoMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("../font/RobotoMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --bg-1: #070e14;
  --bg-2: #002732;
  --text: #c9cfd2;
  --muted: #7f8b91;
  --line: rgb(255 255 255 / 0.12);
  --accent: #7cc4cf;
  --gutter: clamp(1rem, 4vw, 3rem);
  --font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed var(--bg-1);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
}

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

a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: var(--bg-1);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Wide-tracked caps: the site's signature. text-indent balances the trailing letter-space when centered. */
.tracked {
  text-transform: uppercase;
  letter-spacing: var(--track, 0.6em);
  margin-right: calc(var(--track, 0.6em) * -1);
}

/* ---------- Header / footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--gutter);
}

.brand {
  --track: 0.45em;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.site-nav a {
  --track: 0.3em;
  position: relative;
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--muted);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.3em;
  bottom: -0.3em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem var(--gutter);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Page heading ---------- */

.page-title {
  margin: 0;
  text-align: center;
  font-weight: 400;
  font-size: clamp(1.4rem, 4.5vw, 3rem);
  --track: clamp(0.35em, 1.6vw, 1em);
  animation: track-in 2.4s var(--ease) both;
}

.page-subtitle {
  margin: 0.4rem 0 0;
  text-align: center;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  --track: clamp(0.5em, 1.6vw, 1.2em);
  color: var(--muted);
  animation: fade-up 1.2s 0.3s var(--ease) both;
}

@keyframes track-in {
  from {
    letter-spacing: calc(var(--track) * 0.6);
    opacity: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

/* ---------- Home / gallery ---------- */

.home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 5vh, 3.5rem);
  min-width: 0;
  padding-block: clamp(0.5rem, 3vh, 2rem);
}

.gallery {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.gallery.is-dragging {
  cursor: grabbing;
}

.gallery-track {
  display: flex;
  gap: clamp(0.75rem, 3vmin, 2rem);
  width: max-content;
  padding-inline: var(--gutter);
  will-change: transform;
}

.shot {
  flex: none;
  height: clamp(16rem, 56vmin, 40rem);
  aspect-ratio: 5 / 7;
  padding: 0;
  border: 0;
  background: rgb(255 255 255 / 0.03);
  cursor: inherit;
  overflow: hidden;
  animation: fade-up 1s var(--ease) both;
  animation-delay: calc(0.4s + var(--i, 0) * 0.08s);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: grayscale(0.25) brightness(0.9);
  transform: scale(1.02);
  transition: filter 0.6s var(--ease), transform 0.8s var(--ease);
  pointer-events: none;
}

.shot:hover img,
.shot:focus-visible img {
  filter: none;
  transform: scale(1.06);
}

.gallery-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-inline: var(--gutter);
  font-size: 0.75rem;
  color: var(--muted);
}

.progress {
  flex: 1;
  max-width: 20rem;
  height: 1px;
  background: var(--line);
}

.progress span {
  display: block;
  height: 100%;
  background: var(--text);
  transform-origin: left;
  transform: scaleX(0);
}

.hint {
  margin-left: auto;
  --track: 0.25em;
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(4 9 13 / 0.94);
  color: var(--text);
}

.lightbox[open] {
  display: grid;
  place-items: center;
  animation: fade 0.3s ease both;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox img {
  max-width: min(92vw, 70rem);
  max-height: 86svh;
  object-fit: contain;
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgb(0 0 0 / 0.3);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.lb-btn:hover {
  border-color: var(--text);
  color: #fff;
}

.lb-close {
  top: 1.25rem;
  right: 1.25rem;
}

.lb-prev {
  left: 1.25rem;
  top: 50%;
  translate: 0 -50%;
}

.lb-next {
  right: 1.25rem;
  top: 50%;
  translate: 0 -50%;
}

.lb-count {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  translate: -50% 0;
  font-size: 0.75rem;
  color: var(--muted);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 30rem);
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(1.5rem, 5vh, 4rem) var(--gutter);
}

.portrait {
  margin: 0;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  animation: fade-up 1s 0.2s var(--ease) both;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text {
  animation: fade-up 1s 0.35s var(--ease) both;
}

.about-text h1 {
  margin: 0 0 2rem;
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 2rem);
  --track: 0.4em;
}

.degree {
  text-transform: none;
  letter-spacing: 0.1em;
  font-weight: 300;
  color: var(--muted);
}

.timeline {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  border-left: 1px solid var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0 0.6rem 1.5rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 1.3rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.timeline li:last-child::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(124 196 207 / 0.15);
}

.timeline time {
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 0.1rem;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}

.socials {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.socials a:hover {
  color: #fff;
  border-color: var(--text);
  transform: translateY(-2px);
}

.socials svg {
  width: 1.15rem;
  height: 1.15rem;
}

@media (max-width: 760px) {
  .about {
    grid-template-columns: minmax(0, 24rem);
  }
  .portrait {
    max-width: 18rem;
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 420px) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- Text pages (Impressum, 404) ---------- */

.prose {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vh, 4rem) var(--gutter) 3rem;
}

.prose h1 {
  margin: 0 0 3rem;
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 2rem);
  --track: 0.4em;
}

.prose h2 {
  margin: 3rem 0 1rem;
  font-weight: 500;
  font-size: 0.85rem;
  --track: 0.3em;
  color: var(--accent);
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.prose p {
  margin: 0 0 1rem;
  color: #aeb7bb;
  hyphens: auto;
}

.prose address {
  font-style: normal;
}

.center {
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem var(--gutter);
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
