/* ───────── TDRL — Viral Portfolio ───────── */
:root {
  --bg: #000;
  --ink: #f1efe9;
  --muted: #8a8780;
  --line: #262626;
  --accent: #d4ff2a;          /* schimbă culoarea de accent aici */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;  /* titluri */
  --mono: "Roboto", system-ui, sans-serif;                          /* restul textelor */
  --pad: clamp(16px, 3vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 14px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #000; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  padding: 0 var(--pad); margin-bottom: 24px;
}

/* ── top bar ── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  mix-blend-mode: difference;
}
.bar__logo img { display: block; height: 26px; width: auto; }
.bar__live { display: flex; align-items: center; gap: 8px; }
.bar__live i {
  width: 8px; height: 8px; border-radius: 50%; background: #ff2d2d;
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.bar__link { border-bottom: 1px solid currentColor; }

/* ── hero (video văzut prin litere) ── */
.hero {
  position: relative; height: 100svh; min-height: 520px;
  overflow: hidden; background: #000;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__mask {
  position: absolute; inset: 0;
  background: #000; color: #fff;
  mix-blend-mode: multiply;
  display: flex; align-items: center; justify-content: center;
}
.hero__ghost {                       /* logoul slab vizibil, ca hero-ul să nu fie niciodată complet negru */
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: .14; pointer-events: none;
}
.hero__logo { display: block; width: min(84vw, 125svh); height: auto; }
.hero__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding: 18px var(--pad);
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
}

/* ── secțiuni de lucrări ── */
#sections > .cat:first-child { border-top: 0; }
.cat { padding: 80px 0 40px; border-top: 1px solid var(--line); }
.cat__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 0 var(--pad); margin-bottom: 36px;
}
.cat__title {
  font: 900 clamp(56px, 9vw, 140px)/.85 var(--display); text-transform: uppercase;
}
.cat__title small {
  font: 500 12px/1 var(--mono); letter-spacing: .12em; vertical-align: top;
  color: var(--accent); margin-right: 10px;
}
.cat__meta { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); text-align: right; }

.grid {
  display: grid; gap: 10px; padding: 0 var(--pad);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}
.grid--vertical { grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.grid--masonry { display: flex; gap: 10px; align-items: flex-start; }
.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }


.tile {
  position: relative; overflow: hidden; background: #111; cursor: pointer;
  aspect-ratio: var(--ar, 16/9);
}
.grid:not(.grid--masonry) .tile img { position: absolute; inset: 0; }
.grid--masonry .tile { aspect-ratio: auto; }
.grid--masonry .tile img { height: auto; }
.tile img, .tile video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s;
}
.tile video { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.tile.playing video { opacity: 1; }
.tile:hover img { transform: scale(1.04); }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  opacity: 0; transform: translateY(6px); transition: .25s;
}
.tile:hover .tile__cap, .tile:focus-visible .tile__cap { opacity: 1; transform: none; }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: none) { .tile__cap { opacity: 1; transform: none; } }

/* ── contact ── */
.contact { padding: 120px 0 0; border-top: 1px solid var(--line); }
.contact__big {
  display: block; padding: 0 var(--pad);
  font: 900 clamp(72px, 17vw, 300px)/.82 var(--display); text-transform: uppercase;
  transition: color .25s;
}
.contact__big em { font-style: normal; color: var(--accent); }
.contact__big:hover { color: var(--accent); }
.contact__big:hover em { color: var(--ink); }
.contact__links {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px;
  padding: 40px var(--pad); text-transform: uppercase; letter-spacing: .1em; font-size: 12px;
}
.contact__links a { border-bottom: 1px solid var(--line); }
.contact__links a:hover { border-color: var(--accent); color: var(--accent); }
.contact__foot {
  display: flex; justify-content: space-between; padding: 18px var(--pad);
  border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
}

/* ── lightbox ── */
.lb {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: grid; grid-template-rows: auto 1fr;
}
.lb[hidden] { display: none; }
.lb__top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--pad); font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
}
.lb__close:hover { color: var(--accent); }
.lb__stage {
  display: flex; align-items: center; justify-content: center;
  padding: 0 calc(var(--pad) + 48px) var(--pad); min-height: 0;
}
.lb__stage video, .lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font: 900 44px/1 var(--display); padding: 20px var(--pad);
}
.lb__nav:hover { color: var(--accent); }
.lb__nav--prev { left: 0; }
.lb__nav--next { right: 0; }

/* ── efecte pe titlurile categoriilor (fx.js) ── */
.cat__head { position: relative; }
.fx { position: relative; display: inline-block; }
.fx-hud {
  position: absolute; left: 0; top: 100%; margin-top: 10px;
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap; pointer-events: none;
}

/* social */
.soc { cursor: pointer; }
.soc__bars { position: absolute; left: 0; right: 0; top: -18px; display: flex; gap: 4px; }
.soc__bars i { flex: 1; height: 3px; background: rgba(255,255,255,.22); overflow: hidden; border-radius: 2px; }
.soc__bars b { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.soc__pop {
  position: absolute; z-index: 5; pointer-events: none; font-size: 30px; line-height: 1;
  translate: -50% -50%; animation: pop 1.3s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes pop {
  0% { transform: scale(.2); opacity: 0; }
  15% { transform: scale(1.15); opacity: 1; }
  100% { transform: translate(var(--dx), -150px) rotate(var(--r)) scale(.9); opacity: 0; }
}

/* 3D */
.x3d { perspective: 700px; }
.x3d__in { display: inline-grid; transform-style: preserve-3d; will-change: transform; }
.x3d__l { grid-area: 1 / 1; }

/* 2D pixel */
.px { display: block; image-rendering: pixelated; }
.pxw .fx-hud { margin-top: 12px; }

/* CGI render */
.rnd__wire { color: transparent; -webkit-text-stroke: 1px #5b5953; }
.rnd__fill { position: absolute; inset: 0; color: var(--ink); }
.rnd__tile {
  position: absolute; box-sizing: border-box; border: 1.5px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none;
}

/* photo viewfinder */
.vf { padding: .1em .18em 0; cursor: crosshair; }
.vf__c {
  position: absolute; width: 24px; height: 24px; border: 2px solid var(--ink);
  transition: all .35s cubic-bezier(.2,.8,.2,1);
}
.vf__c--tl { top: -14px; left: -14px; border-right: 0; border-bottom: 0; }
.vf__c--tr { top: -14px; right: -14px; border-left: 0; border-bottom: 0; }
.vf__c--bl { bottom: -14px; left: -14px; border-right: 0; border-top: 0; }
.vf__c--br { bottom: -14px; right: -14px; border-left: 0; border-top: 0; }
.vf--on .vf__c { border-color: var(--accent); }
.vf--on .vf__c--tl { top: 0; left: 0; } .vf--on .vf__c--tr { top: 0; right: 0; }
.vf--on .vf__c--bl { bottom: 0; left: 0; } .vf--on .vf__c--br { bottom: 0; right: 0; }
.vf .fx-hud { margin-top: 22px; left: .18em; }
.flash { position: fixed; inset: 0; z-index: 200; background: #fff; pointer-events: none; animation: flash .45s ease-out forwards; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }

/* ── layout-uri suplimentare ── */
.grid--portrait { grid-template-columns: repeat(auto-fill, minmax(min(46%, 240px), 1fr)); grid-auto-flow: dense; }
.feature { padding: 0 var(--pad); margin-bottom: 10px; }
.feature .tile { width: min(100%, 720px); }
.feature .tile img { position: absolute; inset: 0; }
.feature .tile__cap { opacity: 1; transform: none; font-size: 12px; padding: 14px 16px; }

/* motion: litere + timeline */
.wrd { display: inline-block; white-space: nowrap; }
.kin { overflow: visible; }
.kin .ltr { display: inline-block; }
.kin--play .ltr { animation: kin .9s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes kin {
  0% { transform: translateY(60%) scaleY(.4); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.kin__tl {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 14px; height: 12px;
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.kin__track { position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: #3a3a3a; }
.kin__track i {
  position: absolute; top: -3px; width: 7px; height: 7px; background: var(--accent);
  transform: rotate(45deg); margin-left: -3px;
}
.kin__head { position: absolute; top: -4px; left: 0; width: 2px; height: 18px; background: #ff2d2d; }
.kin--play .kin__head { animation: head 1.6s linear both; }
@keyframes head { from { left: 0; } to { left: 100%; } }
.kin__tl em { position: absolute; right: 0; top: 14px; font-style: normal; white-space: nowrap; }

/* graphics: selecție */
.sel__box {
  position: absolute; inset: -6px -8px; border: 1.5px solid #0d99ff; pointer-events: none;
  opacity: 0;
}
.sel__box i { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid #0d99ff; margin: -5px 0 0 -5px; }
.h-tl { left: 0; top: 0; } .h-tc { left: 50%; top: 0; } .h-tr { left: 100%; top: 0; }
.h-ml { left: 0; top: 50%; } .h-mr { left: 100%; top: 50%; }
.h-bl { left: 0; top: 100%; } .h-bc { left: 50%; top: 100%; } .h-br { left: 100%; top: 100%; }
.sel__size {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 10px);
  background: #0d99ff; color: #fff; font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: 3px; white-space: nowrap;
}
.sel__cursor {
  position: absolute; right: -40px; bottom: -30px; pointer-events: none; opacity: 0;
  display: flex; align-items: flex-start; gap: 2px;
}
.sel__cursor b {
  font: 500 11px/1 var(--mono); background: #ff4fb0; color: #fff; padding: 3px 6px; border-radius: 3px; margin-top: 16px;
}
.sel--on .sel__cursor { animation: cur 1.1s cubic-bezier(.3,.7,.2,1) both; }
.sel--on .sel__box { animation: selbox .2s .85s both; }
@keyframes cur {
  from { opacity: 0; transform: translate(140px, 90px); }
  20% { opacity: 1; }
  80% { transform: translate(0, 0); }
  88% { transform: translate(0, 0) scale(.85); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes selbox { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.sel .fx-hud { margin-top: 36px; }

/* ── Beach, Please! 2025 — secțiune de proiect în culorile festivalului ── */
.cat--beach { --bp-pink: #ee43df; --bp-green: #73f94c; }
.bp { display: inline-block; cursor: pointer; }
.bp-logo {
  display: block; width: clamp(220px, 30vw, 440px); height: auto;
  filter: drop-shadow(0 6px 0 #ee43df); will-change: transform; user-select: none;
}
.bp--boing { animation: boing .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes boing {
  0% { transform: scale(1); } 20% { transform: scale(1.15, .82); }
  45% { transform: scale(.9, 1.12); } 70% { transform: scale(1.04, .97); } 100% { transform: scale(1); }
}
.cat--beach .tile {
  border: 6px solid #fff; border-radius: 14px; background: #111;
  box-shadow: 6px 6px 0 var(--bp-green);
  transform: rotate(var(--rot, -2deg));
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s;
}
.cat--beach .tile:nth-child(3n+2) { --rot: 2.5deg; }
.cat--beach .tile:nth-child(3n) { --rot: -1deg; }
.cat--beach .tile:nth-child(2n) { box-shadow: 6px 6px 0 var(--bp-pink); }
.cat--beach .tile:hover { transform: rotate(0) scale(1.05); z-index: 2; }
.cat--beach .tile:hover img { transform: none; }


/* ── grain ── */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .8s steps(4) infinite;
}
@keyframes grain {
  25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 640px) {
  .bar__live { display: none; }
  .lb__stage { padding: 0 8px 70px; }
  .lb__nav { top: auto; bottom: 0; transform: none; }
}
