* {
  box-sizing: border-box;
}

:root {
  --white: #f4f4f2;
  --muted: rgba(244, 244, 242, .68);
  --line: rgba(244, 244, 242, .34);
  --ease: cubic-bezier(.76, 0, .24, 1);
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #08090a;
  color: var(--white);
  font-family: Inter, Arial, sans-serif;
  font-weight: 300;
  overflow: hidden;
}

button, a {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  touch-action: manipulation;
}

.site {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  background: #08090a;
}

/* Video is the actual portfolio background. */
.hero-video,
.hero-slideshow,
.hero-image,
.vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  z-index: -3;
  object-fit: cover;
  background: #101214;
}

.hero-slideshow {
  z-index: -3;
  overflow: hidden;
  background: #101214;
}

.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1200ms ease;
}

.hero-slideshow img.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow img {
    transition-duration: 1ms;
  }
}

/* Fallback image. Hidden as soon as a usable video starts playing. */
.hero-image {
  z-index: -4;
  background:
    linear-gradient(180deg, rgba(7, 10, 13, .08), rgba(7, 10, 13, .32)),
    url("placeholder.svg") center / cover no-repeat;
  transition: opacity 700ms ease;
}

.hero-image.is-hidden {
  opacity: 0;
}

.vignette {
  z-index: -2;
  pointer-events: none;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.46) 32%, rgba(0,0,0,.06) 68%),
    linear-gradient(180deg, rgba(0,0,0,.22), transparent 25%, transparent 72%, rgba(0,0,0,.35));
}

.vignette::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(255,255,255,.045), rgba(255,255,255,0) 68%);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 28%, transparent 62%);
  mask-image: linear-gradient(90deg, #000 0%, #000 28%, transparent 62%);
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 96px;
  padding: 0 4.3vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.logo {
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 36px);
}

.nav {
  display: flex;
  gap: clamp(24px, 3vw, 48px);
}

/* hidden admin/contact styles removed - admin is not linked from the site */

.nav-link {
  position: relative;
  padding: 8px 0;
  cursor: pointer;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  transition: color 250ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-link.is-active::after,
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.content {
  position: absolute;
  left: 4.3vw;
  top: 50%;
  width: min(520px, 43vw);
  transform: translateY(-45%);
  overflow: visible;
}

.content-panel {
  will-change: transform, opacity;
}

.content-panel.is-leaving {
  animation: leaveLeft 600ms var(--ease) both;
}

.content-panel.is-entering {
  animation: enterLeft 600ms var(--ease) both;
}

@keyframes leaveLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-125vw); opacity: 0; }
}

@keyframes enterLeft {
  from { transform: translateX(-125vw); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.eyebrow {
  margin-bottom: 22px;
  color: rgba(255,255,255,.62);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(38px, 4.25vw, 68px);
  line-height: .99;
  letter-spacing: -.055em;
  font-weight: 300;
}

.intro {
  max-width: 420px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 30px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 13px;
  text-decoration: none;
  transition: color 200ms ease, opacity 200ms ease;
}

.contact-link:hover {
  color: #fff;
  opacity: .72;
}

.phone-protected {
  cursor: pointer;
}

.contact-link-icon {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.62);
}

img.contact-link-icon {
  filter: brightness(0) invert(1) !important;
  opacity: .82;
}

.lang-toggle {
  min-width: 40px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  color: rgba(255,255,255,.8);
  font-size: 11px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.lang-toggle:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255,255,255,.06);
}

.slide-indicator {
  position: absolute;
  right: 4.3vw;
  bottom: 4.4vh;
  display: flex;
  gap: 8px;
  color: rgba(255,255,255,.52);
  font-size: 10px;
  letter-spacing: .12em;
}

.indicator-current {
  color: #fff;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 4.2vh;
  transform: translateX(-50%);
  color: rgba(255,255,255,.5);
  font-size: 10px;
  letter-spacing: .12em;
}

.scroll-hint::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-left: 10px;
  vertical-align: middle;
  background: rgba(255,255,255,.45);
}

@media (max-width: 800px) {
  .site {
    min-height: 560px;
  }

  .header {
    height: 78px;
    padding: 0 6vw;
  }

  .nav {
    gap: clamp(10px, 3.5vw, 18px);
  }

  .nav-link {
    font-size: 10px;
  }

  .header-right {
    gap: 12px;
  }

  .lang-toggle {
    min-width: 36px;
    padding: 6px 8px;
  }

  .content {
    left: 6vw;
    width: 88vw;
    top: 53%;
    transform: translateY(-45%);
  }

  h1 {
    font-size: clamp(40px, 11vw, 64px);
  }

  .intro {
    max-width: 360px;
  }

  .vignette {
    background:
      linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.12)),
      linear-gradient(180deg, rgba(0,0,0,.3), transparent 35%, rgba(0,0,0,.48));
  }

  .vignette::before {
    background: rgba(255,255,255,.025);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .slide-indicator {
    right: 6vw;
  }

  .scroll-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-panel.is-leaving,
  .content-panel.is-entering {
    animation-duration: 1ms;
  }
}
