:root {
  --bg: #000;
  --fg: #fff;
  --dim: #4d4d4d;
  --mute: #9a9a9a;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --display-weight: 400;
  --text: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); }
body {
  background: var(--bg);
  font-family: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.ov-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* ---------- header ---------- */
.top {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 64px) var(--pad) 0;
  text-align: center;
}
.logo { display: inline-block; text-decoration: none; }
.logo-box {
  display: inline-flex;
  flex-direction: column;
  border: clamp(3px, .45vw, 6px) solid var(--fg);
  padding: .1em .16em .04em;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(40px, 7.5vw, 104px);
  line-height: .9;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.logo-img {
  display: block;
  max-width: min(70vw, 420px);
  max-height: clamp(70px, 12vw, 170px);
  object-fit: contain;
}
.cats {
  margin-top: clamp(26px, 4vw, 52px);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .05em .55em;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(26px, 4.4vw, 62px);
  line-height: 1.05;
  text-transform: uppercase;
}
.cats a {
  text-decoration: none;
  color: var(--dim);
  transition: color .3s;
}
.cats a:hover, .cats a[aria-current="page"] { color: var(--fg); }
.views {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--dim);
}
.views button { color: var(--dim); letter-spacing: inherit; padding: 4px 2px; transition: color .25s; }
.views button[aria-pressed="true"], .views button:hover { color: var(--fg); }

/* ---------- grid (ycfu) ---------- */
.grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 28px);
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 72px) var(--pad);
}
.tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0b0b0b;
  cursor: pointer;
  animation: rise .7s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(.2);
  transition: transform 1s var(--ease), opacity .45s, filter .45s;
}
.tile:hover img { transform: scale(1.04); filter: none; }
/* kai fonas rodomas, kitos kortelės prigęsta, kad matytųsi fonas */
.tile { transition: opacity .5s; }
body.bg-on .grid:hover .tile:not(:hover):not(.open) { opacity: .3; }
.tile.open { background: rgba(0, 0, 0, .55); }
.tile-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8%;
  text-align: center;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.tile.open img { opacity: 0; transform: scale(1.08); }
.tile.open .tile-info { opacity: 1; pointer-events: auto; }
.tile-info h3 {
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(20px, 2.8vw, 42px);
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(8px);
  transition: transform .5s var(--ease);
}
.tile.open h3 { transform: none; }
.role {
  margin-top: .7em;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}
.tile .bio {
  margin-top: 1.1em;
  max-width: 34ch;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.5;
  color: #cfcfcf;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.more {
  margin-top: 1.4em;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}
.empty { grid-column: 1 / -1; text-align: center; color: var(--mute); padding: 10vh 0; }

/* ---------- list (sept) ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.15) 20%, rgba(0,0,0,.8));
}
.bg-img {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  filter: grayscale(var(--bg-gray, 1)) brightness(var(--bg-bright, .45));
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 6s ease;
}
.bg-img.on { opacity: 1; transform: scale(1); }
body.is-list .bg, body.bg-on .bg { opacity: 1; }

.list {
  position: relative;
  z-index: 1;
  list-style: none;
  text-align: center;
  /* Sąrašas prasideda iškart po meniu; aktyvi linija (site.js) pradžioje stovi ant pirmo vardo. */
  padding: clamp(24px, 5vh, 56px) var(--pad) 32vh;
}
.list button {
  font-size: clamp(34px, 6.2vw, 90px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: rgba(255,255,255,.26);
  transition: color .35s;
}
.list li.active button, .list button:hover { color: var(--fg); }
.list small {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #ccc;
  transition: max-height .4s var(--ease), opacity .4s, margin .4s var(--ease);
}
.list li.active small { max-height: 2.4em; opacity: 1; margin: .3em 0 .9em; }

body.is-list .grid, body:not(.is-list) .list { display: none; }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  padding: 24px var(--pad) 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
}
.foot a { text-decoration: none; transition: color .25s; }
.foot a:hover { color: var(--fg); }
/* Sąraše poraštė prilipusi apačioje: vardai švelniai išnyksta už jos, o ne lipa ant teksto. */
body.is-list .foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: clamp(56px, 10vh, 96px);
  padding-bottom: 22px;
  background: linear-gradient(to top, #000 0%, rgba(0,0,0,.92) 40%, rgba(0,0,0,.6) 70%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
body.is-list .foot a { pointer-events: auto; }

/* ---------- overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
.overlay.on { opacity: 1; visibility: visible; }
.ov-close {
  position: fixed;
  top: 22px;
  right: var(--pad);
  z-index: 2;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  mix-blend-mode: difference;
}
.ov-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}
.ov-body.solo { grid-template-columns: minmax(0, 1fr); max-width: 900px; margin: 0 auto; }
.ov-photo { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.ov-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ov-text {
  align-self: center;
  padding: clamp(40px, 6vw, 96px) var(--pad);
  transform: translateY(16px);
  transition: transform .6s var(--ease);
}
.overlay.on .ov-text { transform: none; }
.ov-kicker { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }
.ov-title {
  margin-top: .25em;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(46px, 7vw, 112px);
  line-height: .95;
  text-transform: uppercase;
}
.ov-text .role { margin-top: 1.2em; }
.ov-bio { margin-top: 2em; max-width: 52ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: #d6d6d6; }
/* aprašymo HTML iš TVS */
.rich > * + * { margin-top: 1em; }
.rich h2, .rich h3, .rich h4 {
  margin-top: 1.6em;
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--fg);
}
.rich h2 { font-size: 1.8em; }
.rich h3 { font-size: 1.35em; }
.rich h4 { font-size: 1.1em; }
.rich strong, .rich b { color: var(--fg); font-weight: 500; }
.rich a { text-underline-offset: 3px; }
.rich ul, .rich ol { padding-left: 1.3em; }
.rich li + li { margin-top: .35em; }
.rich blockquote { padding-left: 1em; border-left: 2px solid var(--fg); color: var(--fg); }
.rich hr { border: 0; border-top: 1px solid #333; }
.rich img { max-width: 100%; height: auto; display: block; }
.rich table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: .85em;
}
.rich th, .rich td { padding: .55em .9em; border-bottom: 1px solid #2c2c2c; text-align: left; vertical-align: top; }
.rich th {
  font-size: .78em;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom-color: #555;
}
.contacts { margin-top: 2.6em; }
.contacts ul { list-style: none; margin-top: 1em; display: grid; gap: .55em; }
.contacts li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 1em; align-items: baseline; }
.c-type { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.contacts a { font-size: clamp(15px, 1.2vw, 18px); text-decoration: none; overflow-wrap: anywhere; border-bottom: 1px solid transparent; transition: border-color .25s; }
.contacts a:hover { border-bottom-color: currentColor; }
.ov-links { margin-top: 2.4em; display: flex; flex-wrap: wrap; gap: 14px 28px; }
.ov-links a { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ov-body { grid-template-columns: minmax(0, 1fr); }
  .ov-photo { position: relative; height: 62vh; }
  .tile .bio { display: none; }
  .more { margin-top: 1em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
