*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: var(--font-family-body);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }
.muted { color: var(--color-text-muted); }

/* ---------- Canvas ---------- */
.canvas {
  position: fixed;
  inset: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  z-index: 0;
}
.canvas.dragging { cursor: grabbing; }
.photo {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-bg-surface);
  cursor: zoom-in;
  will-change: transform, opacity;
  overflow: hidden;
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
}
.photo img.loaded { opacity: 1; }
.photo:focus-visible { outline: var(--border-focus) solid var(--color-focus-ring); outline-offset: var(--spacing-half); }

/* ---------- Hero ---------- */
.hero {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--spacing-2);
  text-align: center;
  pointer-events: none;
  padding-inline: var(--spacing-2);
  z-index: 1;
}
.hero-title { margin: 0; }
.hero-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-1);
}
.hero-line { margin: 0; color: var(--color-text-muted); max-width: 320px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-3);
  pointer-events: none;
  z-index: 2;
}
.topbar > * { pointer-events: auto; }
.chip { background: var(--color-bg-page); }
.chip:hover { background: var(--color-bg-surface); }

/* ---------- Dock ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-3);
  pointer-events: none;
  z-index: 2;
}
.dock > * { pointer-events: auto; }
.hint { margin: 0; color: var(--color-text-muted); background: var(--color-bg-page); padding: var(--spacing-half) var(--spacing-1); border-radius: var(--radius-full); }
.cta { min-height: var(--sizing-control-lg); padding-inline: var(--spacing-3); }
.dot {
  width: var(--spacing-1);
  height: var(--spacing-1);
  border-radius: var(--radius-full);
  background: var(--color-signal);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { 50% { opacity: var(--opacity-disabled); } }

/* ---------- Dialogs ---------- */
dialog { color: var(--color-text-primary); }
dialog::backdrop {
  background: var(--color-bg-inverse);
  opacity: var(--opacity-scrim);
}
.close {
  position: absolute;
  top: var(--spacing-2);
  right: var(--spacing-2);
  width: var(--sizing-control-md);
  padding: 0;
}

.panel {
  display: none;
  flex-direction: column;
  width: min(480px, calc(100vw - var(--spacing-4)));
  max-height: calc(100dvh - var(--spacing-4));
  margin: var(--spacing-2) var(--spacing-2) var(--spacing-2) auto;
  overflow-y: auto;
}
.panel[open] { display: flex; animation: slide-in var(--dur-base) var(--ease); }
.panel h2, .panel h3, .panel p, .panel ul { margin: 0; }
.panel h2 { padding-right: var(--spacing-6); }
@keyframes slide-in { from { transform: translateX(var(--spacing-4)); opacity: 0; } }

.proof { list-style: none; padding: 0; display: grid; gap: var(--spacing-1); }
.proof li { padding-bottom: var(--spacing-1); border-bottom: var(--border-hairline) solid var(--color-border-default); }
.row { display: flex; flex-wrap: wrap; gap: var(--spacing-1); }

/* Form */
.form { display: grid; gap: var(--spacing-2); }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--spacing-1); }
.form legend { padding: 0; margin-bottom: var(--spacing-1); }
.chips { display: flex; flex-wrap: wrap; gap: var(--spacing-1); }
.chips .chip[aria-pressed="true"] {
  background: var(--color-accent-default);
  color: var(--color-on-accent);
  border-color: var(--color-accent-default);
}
.field { display: grid; gap: var(--spacing-1); }
.field .input { width: 100%; }
.textarea { padding-block: var(--spacing-1); resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-2); }
.submit { min-height: var(--sizing-control-lg); width: 100%; }
.form p { margin: 0; }
.error { color: var(--color-danger); }

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--spacing-8) var(--spacing-3) var(--spacing-3);
  border: 0;
  background: var(--color-bg-page);
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; gap: var(--spacing-3); animation: fade var(--dur-base) var(--ease); }
.lightbox figure { margin: 0; min-height: 0; position: relative; }
.lightbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-2);
}
.lightbox-bar p { margin: 0; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
  .topbar, .dock { padding: var(--spacing-2); }
  .hint { display: none; }
  .cta { width: 100%; }
  .panel {
    width: 100vw;
    max-width: 100vw;
    max-height: 88dvh;
    margin: auto 0 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--spacing-3) var(--spacing-2) var(--spacing-4);
  }
  @keyframes slide-in { from { transform: translateY(var(--spacing-8)); opacity: 0; } }
  .grid2 { grid-template-columns: 1fr; }
  .lightbox { padding: var(--spacing-8) var(--spacing-2) var(--spacing-2); }
  .lightbox-bar { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Version B: calm, Apple-style type ---------- */
:root {
  --font-family-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-family-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-family-mono: var(--font-family-body);
}
.hero-title {
  font-weight: var(--font-weight-semibold);
  font-size: 128px;
  line-height: 128px;
  letter-spacing: -0.045em;
}
.hero-line { letter-spacing: -0.01em; }
.text-heading-1 { font-weight: var(--font-weight-semibold); letter-spacing: -0.03em; }
.text-caption { text-transform: none; letter-spacing: 0; }
.chip, .btn { letter-spacing: -0.01em; }
.hint { font-weight: var(--font-weight-regular); }
@media (max-width: 767.98px) {
  .hero-title { font-size: 72px; line-height: 72px; }
}
.photo { background: transparent; }

/* Title in Clash Display, all caps */
.hero-title {
  font-family: "Clash Display", var(--font-family-display);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* Title glides to the top while exploring */
.hero-title {
  transition: transform var(--dur-slow) var(--ease);
  will-change: transform;
}
body.moving .hero-title {
  transform: translateY(calc(-50dvh + var(--spacing-5))) scale(0.25);
}
@media (max-width: 767.98px) {
  body.moving .hero-title { transform: translateY(calc(-50dvh + var(--spacing-4))) scale(0.4); }
}

/* Logo lockup: small PHOTOGRAPHY sitting top-right of ÁRON */
.hero-title {
  position: relative;
  font-weight: var(--font-weight-bold);
}
.hero-sub {
  position: absolute;
  right: 0.02em;
  top: -0.5em;
  font-size: 0.18em;
  line-height: 1;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
}
.hero-sub { transition: opacity var(--dur-base) var(--ease); }
body.moving .hero-sub { opacity: 0; }

/* Lockup v2: PHOTOGRAPHY centred under ÁRON */
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-1);
}
.hero-sub {
  position: static;
}

/* ---------- Fluid title: dissolve in the centre, settle in the top bar ---------- */
:root { --ease-fluid: cubic-bezier(.22, 1, .36, 1); --dur-fluid: 1s; }
.hero-title,
.hero-sub,
.top-logo {
  transition:
    opacity var(--dur-fluid) var(--ease-fluid),
    filter var(--dur-fluid) var(--ease-fluid),
    transform var(--dur-fluid) var(--ease-fluid);
}
.hero-title { transition-delay: .12s; }
body.moving .hero-title {
  opacity: 0;
  filter: blur(var(--spacing-1));
  transform: scale(.96);
  transition-delay: 0s;
}
body.moving .hero-sub { opacity: 0; }
.top-logo {
  position: absolute;
  left: 50%;
  top: var(--spacing-3);
  height: var(--sizing-control-sm);
  display: flex;
  align-items: center;
  font: var(--font-weight-bold) 24px/32px "Clash Display", var(--font-family-display);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  pointer-events: none;
  opacity: 0;
  filter: blur(var(--spacing-1));
  transform: translate(-50%, var(--spacing-1));
}
body.moving .top-logo {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, 0);
  transition-delay: .12s;
}

/* first load: the name rises out of a soft blur */
@keyframes rise-in {
  from { opacity: 0; filter: blur(var(--spacing-2)); transform: translateY(var(--spacing-2)); }
}
.hero-title { animation: rise-in 1.4s var(--ease-fluid) .2s backwards; }
.hero-sub { animation: rise-in 1.4s var(--ease-fluid) .6s backwards; }

/* ---------- Borderless top chips ---------- */
.topbar .chip { border: 0; background: transparent; }
.topbar .chip:hover { background: var(--color-bg-surface); }

/* ---------- Minimal panels and form ---------- */
.panel .text-heading-2 {
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.02em;
}
.panel strong { font-weight: var(--font-weight-medium); }
.panel .btn { font-weight: var(--font-weight-regular); }

@media (prefers-reduced-motion: reduce) {
  .top-logo, body.moving .hero-title { filter: none; }
}

/* ---------- Form: three fields, nothing else ---------- */
.form { display: grid; gap: var(--spacing-4); }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--spacing-2); }
.form legend { padding: 0; margin-bottom: var(--spacing-2); }
.form-label { color: var(--color-text-muted); }
.field { display: grid; gap: var(--spacing-1); }
.form .input {
  width: 100%;
  min-height: var(--sizing-control-lg);
  padding: var(--spacing-1) var(--spacing-2);
  border: var(--border-hairline) solid transparent;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
  color: var(--color-text-primary);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.form .input::placeholder { color: var(--color-text-muted); }
.form .input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--color-text-primary) 40%, transparent);
  background: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
}
.form .input[aria-invalid="true"] { border-color: var(--color-danger); }
.form .textarea { min-height: var(--spacing-16); resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: var(--spacing-1); }
.chips .chip {
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
  border: var(--border-hairline) solid color-mix(in srgb, var(--color-text-primary) 16%, transparent);
  background: transparent;
}
.chips .chip[aria-pressed="true"] {
  color: var(--color-on-accent);
  background: var(--color-accent-default);
  border-color: var(--color-accent-default);
}
.form .submit { min-height: var(--sizing-control-lg); width: 100%; }
.form p { margin: 0; }
.panel .text-heading-2 { font-weight: var(--font-weight-regular); letter-spacing: -0.02em; }
.panel .btn { font-weight: var(--font-weight-regular); }
.panel strong { font-weight: var(--font-weight-medium); }

/* ---------- Echo trail between centre and top bar ---------- */
.echo-layer { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.echo {
  position: absolute;
  opacity: 0;
  white-space: nowrap;
  font-family: "Clash Display", var(--font-family-display);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
/* the real title hides at once; the echo copy carries it */
body.moving .hero-title { transition: opacity var(--dur-fast) linear; transition-delay: 0s; filter: none; transform: none; }
body:not(.moving) .hero-title { transition: opacity var(--dur-fast) linear; transition-delay: 0s; }
body.moving:not(.logo-on) .top-logo { opacity: 0; transition: none; }
body.logo-on .top-logo { opacity: 1; filter: blur(0); transform: translate(-50%, 0); transition: none; }
body.moving .hero-sub { transition: opacity var(--dur-fast) linear; }

/* ---------- Booking link, top right: text + live dot ---------- */
.topbar .cta-top {
  gap: var(--spacing-1);
  color: var(--color-text-primary);
}
.dock { justify-content: flex-start; }
.cta-short { display: none; }
@media (max-width: 767.98px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
}

/* ---------- Full-height booking panel ---------- */
#book.panel {
  height: calc(100dvh - var(--spacing-4));
  max-height: calc(100dvh - var(--spacing-4));
}
#book .form { flex: 1; display: flex; flex-direction: column; gap: var(--spacing-4); }
#book .field:has(.textarea) { flex: 1; grid-template-rows: auto 1fr; }
#book .textarea { height: 100%; resize: none; }
#book .submit { margin-top: auto; }
@media (max-width: 767.98px) {
  #book.panel { height: calc(100dvh - var(--spacing-2)); max-height: calc(100dvh - var(--spacing-2)); }
}

/* ---------- Dark overlay behind panels ---------- */
dialog::backdrop {
  background: color-mix(in srgb, var(--ink-950) 72%, transparent);
  opacity: 1;
  backdrop-filter: blur(var(--spacing-1));
  -webkit-backdrop-filter: blur(var(--spacing-1));
}

/* ---------- Hover on the name: what kind of photography ---------- */
.hero-title { pointer-events: auto; cursor: default; }
.hero-kind {
  position: absolute;
  top: 100%;
  left: 50%;
  white-space: nowrap;
  font: var(--font-weight-regular) 16px/24px var(--font-family-body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-muted);
  opacity: 0;
  filter: blur(var(--spacing-half));
  transform: translate(-50%, calc(-1 * var(--spacing-1)));
  transition:
    opacity var(--dur-slow) var(--ease-fluid),
    filter var(--dur-slow) var(--ease-fluid),
    transform var(--dur-slow) var(--ease-fluid);
  pointer-events: none;
}
.hero-title:hover .hero-kind {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, 0);
}
body.moving .hero-title { pointer-events: none; }

/* ---------- About panel: portrait, toggle, text, works ---------- */
#about.panel {
  height: calc(100dvh - var(--spacing-4));
  max-height: calc(100dvh - var(--spacing-4));
  gap: var(--spacing-3);
}
#about .close {
  z-index: 1;
  background: color-mix(in srgb, var(--ink-950) 48%, transparent);
  color: var(--paper-50);
}
.about-portrait { margin: 0; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0; }
.about-portrait img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-head { display: grid; gap: var(--spacing-half); }
.about-head h2, .about-head p { margin: 0; }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: var(--spacing-half);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
  flex-shrink: 0;
}
.seg-btn {
  min-height: var(--sizing-control-sm);
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font: var(--font-weight-regular) 14px/16px var(--font-family-body);
  transition: background var(--dur-base) var(--ease-fluid), color var(--dur-base) var(--ease-fluid);
}
.seg-btn[aria-selected="true"] {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}
.seg-btn:focus-visible { outline: var(--border-focus) solid var(--color-focus-ring); outline-offset: var(--spacing-half); }

.about-pane { display: grid; gap: var(--spacing-2); animation: fade var(--dur-base) var(--ease-fluid); }
.about-pane[hidden] { display: none; }
.about-pane p { margin: 0; }
.about-quote { margin: 0 0 var(--spacing-1); font-weight: var(--font-weight-regular); letter-spacing: -0.02em; }
.about-quote p + p { color: var(--color-text-muted); }

.work { display: grid; gap: var(--spacing-1); padding-bottom: var(--spacing-2); }
.work + .work { padding-top: var(--spacing-2); border-top: var(--border-hairline) solid color-mix(in srgb, var(--color-text-primary) 12%, transparent); }
.work img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-md); }
.work h3 { margin: var(--spacing-1) 0 0; font-weight: var(--font-weight-medium); }
@media (max-width: 767.98px) {
  #about.panel { height: calc(100dvh - var(--spacing-2)); max-height: calc(100dvh - var(--spacing-2)); }
}

/* About header: portrait beside the name */
#about .close { background: transparent; color: var(--color-text-primary); }
.about-head {
  display: grid;
  grid-template-columns: var(--spacing-12) 1fr;
  align-items: center;
  gap: var(--spacing-2);
  padding-right: var(--spacing-4);
}
.avatar {
  width: var(--spacing-12);
  height: var(--spacing-12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
}
.about-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 34%;
  transform: scale(3);
  transform-origin: 56% 34%;
}
.about-id { display: grid; gap: var(--spacing-half); min-width: 0; }
.about-id h2, .about-id p { margin: 0; }
dialog:focus { outline: none; }

/* ---------- Sticky panel top: content scrolls underneath ---------- */
.panel-top {
  position: sticky;
  top: calc(-1 * var(--spacing-4));
  z-index: 2;
  display: grid;
  gap: var(--spacing-3);
  margin: calc(-1 * var(--spacing-4)) calc(-1 * var(--spacing-4)) 0;
  padding: var(--spacing-4) var(--spacing-4) var(--spacing-2);
  background: var(--color-bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.panel-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--spacing-4);
  background: linear-gradient(var(--color-bg-surface), transparent);
  pointer-events: none;
}
.panel-top h2, .panel-top p { margin: 0; }
.panel-top .close { top: var(--spacing-2); right: var(--spacing-2); }
#book .panel-top { gap: var(--spacing-1); }

@media (max-width: 767.98px) {
  .panel-top {
    top: calc(-1 * var(--spacing-3));
    margin: calc(-1 * var(--spacing-3)) calc(-1 * var(--spacing-2)) 0;
    padding: var(--spacing-3) var(--spacing-2) var(--spacing-2);
  }
}

/* Portrait: Áron centred in the square (head and shoulders) */
.avatar { position: relative; flex-shrink: 0; }
.about-avatar {
  position: absolute;
  width: 400%;
  max-width: none;
  height: auto;
  left: -180%;
  top: -84%;
  object-fit: fill;
  transform: none;
}

/* ---------- Lockup: small LENDVAI over the right of ÁRON ---------- */
.hero-title .word { position: relative; display: inline-block; letter-spacing: 0; }
/* optical spacing, measured from the glyph outlines so all three gaps read the same */
.k-a { margin-right: 0.02em; }
.k-r { margin-right: 0.01em; }
.k-o { margin-right: 0.005em; }
.echo, .top-logo { letter-spacing: 0; }
.hero-first {
  position: absolute;
  right: 0.01em;
  top: -0.5em;
  font-size: 0.18em;
  line-height: 1;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* role line: always visible */
.hero-kind,
.hero-title:hover .hero-kind {
  opacity: 1;
  filter: none;
  transform: translate(-50%, 0);
  margin-top: var(--spacing-1);
}
.hero-kind { animation: rise-in 1.4s var(--ease-fluid) .6s backwards; }

/* ---------- Quiet grain on the background ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 256px 256px;
}

/* ---------- Seamless landing back in the centre ---------- */
/* the travelling copy and the real title swap in the same frame: no fade, no flicker */
body:not(.moving) .hero-title { transition: none; }
/* the role line leaves at once, then returns softly after the name has landed */
body.moving .hero-kind {
  opacity: 0;
  filter: blur(var(--spacing-half));
  transform: translate(-50%, var(--spacing-half));
  transition: opacity var(--dur-fast) linear, filter var(--dur-fast) linear, transform var(--dur-fast) linear;
}
body:not(.moving) .hero-kind {
  transition:
    opacity 1.2s var(--ease-fluid) .3s,
    filter 1.2s var(--ease-fluid) .3s,
    transform 1.2s var(--ease-fluid) .3s;
}

/* ---------- Custom Á: a flat bar over the A (replaces the acute) ---------- */
.k-a { position: relative; display: inline-block; line-height: 1; }
.k-a::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.03em;
  width: 0.35em;
  height: 0.1em;
  background: currentColor;
  transform: translateX(-50%);
}

/* ---------- Role line: centred without translateX, so it only ever moves vertically ---------- */
.hero-kind,
.hero-title:hover .hero-kind {
  left: 0;
  right: 0;
  text-align: center;
  transform: none;
}
body.moving .hero-kind { transform: translateY(var(--spacing-half)); }

/* ---------- LENDVAI small and centred above ĀRON ---------- */
.hero-first {
  left: 0;
  right: 0;
  top: auto;
  bottom: 100%;
  margin-bottom: 1em; /* in LENDVAI's own letter size */
  text-align: center;
  font-size: 0.15em;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* ---------- Opening order: LENDVAI, then ĀRON, then the role line ---------- */
.hero-title { animation: none; }
.hero-first { animation: rise-in 1.2s var(--ease-fluid) .2s backwards; }
.word > span:not(.hero-first) {
  display: inline-block;
  animation: rise-in 1.4s var(--ease-fluid) .8s backwards;
}
.hero-kind { animation: rise-in 1.4s var(--ease-fluid) 1.5s backwards; }

/* ---------- Background with depth: uneven tone, soft light, vignette, living grain ---------- */
body {
  background-color: var(--color-bg-page);
  background-image:
    /* edges fall off into darkness */
    radial-gradient(130% 95% at 50% 42%, transparent 45%, color-mix(in srgb, var(--ink-950) 70%, transparent) 100%),
    /* faint light pooled behind the name */
    radial-gradient(55% 45% at 50% 42%, color-mix(in srgb, var(--paper-50) 3%, transparent), transparent 70%),
    /* large, slow mottling like uneven paper or film density */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1024' height='1024'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  .9 0 0 0 -.25'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  background-size: auto, auto, 1024px 1024px;
  background-attachment: fixed;
}

/* fine grain: more contrast so specks read light and dark, shifting slowly like film */
body::before {
  inset: -50%;
  opacity: .08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='linear' slope='2' intercept='-.8'/><feFuncG type='linear' slope='2' intercept='-.8'/><feFuncB type='linear' slope='2' intercept='-.8'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.6s steps(1) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
}

/* ---------- Smoother motion ---------- */
/* the travelling title is its own layer, so scaling it never re-renders the text mid-flight */
.echo { will-change: transform, opacity; backface-visibility: hidden; }
/* LENDVAI settles in softly after ĀRON lands, instead of popping in */
body.moving .hero-first { opacity: 0; transition: none; }
body:not(.moving) .hero-first { transition: opacity var(--dur-slow) var(--ease-fluid) .15s; }

/* dialogs glide in on a long, decelerating curve; the overlay fades in with them */
.panel[open] { animation: panel-in .6s var(--ease-fluid); }
@keyframes panel-in { from { opacity: 0; transform: translateX(var(--spacing-6)); } }
.lightbox[open] { animation: lightbox-in .5s var(--ease-fluid); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.98); } }
dialog[open]::backdrop { animation: backdrop-in .5s var(--ease-fluid); }
@keyframes backdrop-in { from { opacity: 0; } }
@media (max-width: 767.98px) {
  @keyframes panel-in { from { opacity: 0; transform: translateY(var(--spacing-8)); } }
}

/* ---------- Projektek: its own panel next to Rólam ---------- */
.topbar-left { display: flex; gap: var(--spacing-1); }
#projects.panel {
  height: calc(100dvh - var(--spacing-4));
  max-height: calc(100dvh - var(--spacing-4));
  gap: var(--spacing-3);
}
#projects .close { background: transparent; color: var(--color-text-primary); }
#projects .about-id { padding-right: var(--spacing-6); }
@media (max-width: 767.98px) {
  #projects.panel { height: calc(100dvh - var(--spacing-2)); max-height: calc(100dvh - var(--spacing-2)); }
  .topbar-left { gap: 0; }
}

/* mobile: three links and the small name share one row */
@media (max-width: 767.98px) {
  .topbar .chip { padding-inline: var(--spacing-1); }
  .top-logo { font-size: 16px; line-height: 24px; }
}

/* ---------- Photo → lightbox: the photo grows out of the canvas ---------- */
.photo.lifted { opacity: 0 !important; }
.lightbox[open] { animation: none; }

/* ---------- Projektek cards link to their own pages ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: var(--ease-fluid); }
a.work { color: inherit; text-decoration: none; border-radius: var(--radius-md); }
a.work img { transition: opacity var(--dur-base) var(--ease-fluid); }
a.work:hover img { opacity: .85; }
.work-arrow { display: inline-block; transition: transform var(--dur-base) var(--ease-fluid); }
a.work:hover .work-arrow { transform: translateX(var(--spacing-half)); }
a.work:focus-visible { outline: var(--border-focus) solid var(--color-focus-ring); outline-offset: var(--spacing-half); }

/* ---------- Project pages: same canvas, the project's title in the centre ---------- */
.project .hero-title { font-size: min(128px, var(--fit)); line-height: 1; }
.project .top-logo { font-size: 16px; line-height: 24px; text-transform: uppercase; }
.project .echo { text-transform: uppercase; }
.topbar-right { display: flex; gap: var(--spacing-1); }
a.chip { text-decoration: none; gap: var(--spacing-1); }
.info-short, .project .topbar .cta-short { display: none; }
.lightbox-bar p:empty { display: none; }
.info-out { justify-self: start; color: var(--color-text-primary); text-underline-offset: var(--spacing-half); }
.info-foot {
  display: grid;
  gap: var(--spacing-3);
  margin-top: auto;
  padding-top: var(--spacing-3);
  border-top: var(--border-hairline) solid color-mix(in srgb, var(--color-text-primary) 12%, transparent);
}
.info-next { display: grid; gap: var(--spacing-half); color: var(--color-text-primary); text-decoration: none; }
.info-next:hover .work-arrow { transform: translateX(var(--spacing-half)); }
.info-next:focus-visible { outline: var(--border-focus) solid var(--color-focus-ring); outline-offset: var(--spacing-half); }
@media (max-width: 1023.98px) {
  .project .topbar .cta-long { display: none; }
  .project .topbar .cta-short { display: inline; }
}
@media (max-width: 767.98px) {
  .project .hero-title { font-size: min(72px, var(--fit)); }
  .back-label, .info-long, .project .topbar .cta-top { display: none; }
  .info-short { display: inline; }
}
.project .hero-first { font-size: max(12px, 0.15em); }
.project .hero-kind { white-space: normal; text-wrap: balance; }
/* mobile: the small name lines up with the top bar links */
@media (max-width: 767.98px) { .top-logo { top: var(--spacing-2); } }

/* square photos everywhere */
.photo, .photo img, .lightbox img, .work img, .avatar, .about-avatar, a.work { border-radius: 0; }
/* square side panels */
dialog.sheet.panel, .panel .panel-top, .about-portrait { border-radius: 0; }

/* ---------- Page to page: the old page sinks away, the new one rises in ---------- */
::view-transition-old(root) { animation: vt-out .4s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .8s cubic-bezier(.22, 1, .36, 1) .08s both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.98); filter: blur(var(--spacing-1)); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(var(--spacing-3)); filter: blur(var(--spacing-1)); } }
/* the top bar stays put; the tapped project photo flies into place */
.topbar { view-transition-name: topbar; }
::view-transition-group(topbar) { animation-duration: .6s; }
::view-transition-group(project-cover) { animation-duration: .8s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
/* back home from a project: no opening intro */
.returning .hero-first, .returning .word > span, .returning .hero-kind { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}
/* square form fields */
#book-form .input { border-radius: 0; }
/* About: works and exhibitions list */
.about-proof-title { margin: var(--spacing-2) 0 0; font-weight: var(--font-weight-regular); }
#pane-me .proof { margin: 0; }

/* ---------- Mobile: Rólam and Projektek fold into a menu button ---------- */
.nav-links { display: flex; gap: var(--spacing-1); }
.menu-btn { display: none; }
@media (max-width: 767.98px) {
  .topbar-left { position: relative; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--spacing-5);
    padding: 0;
  }
  .menu-icon { position: relative; width: var(--spacing-2); height: var(--spacing-1); }
  .menu-icon span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    transition: transform var(--dur-base) var(--ease-fluid), top var(--dur-base) var(--ease-fluid);
  }
  .menu-icon span:first-child { top: 0; }
  .menu-icon span:last-child { top: calc(100% - 2px); }
  .menu-btn[aria-expanded="true"] .menu-icon span { top: calc(50% - 1px); }
  .menu-btn[aria-expanded="true"] .menu-icon span:first-child { transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-icon span:last-child { transform: rotate(-45deg); }
  .nav-links {
    position: absolute;
    top: calc(100% + var(--spacing-1));
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: calc(var(--spacing-10) * 2);
    padding: var(--spacing-1);
    background: var(--color-bg-surface);
    border: var(--border-hairline) solid var(--color-border-default);
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-1 * var(--spacing-1)));
    transition: opacity var(--dur-base) var(--ease-fluid), transform var(--dur-base) var(--ease-fluid), visibility 0s linear var(--dur-base);
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity var(--dur-base) var(--ease-fluid), transform var(--dur-base) var(--ease-fluid);
  }
  .topbar .nav-links .chip { justify-content: flex-start; padding: var(--spacing-1) var(--spacing-2); border-radius: 0; }
}
