/* ==========================================================
   Goda Daraškevičiūtė — portfolio, versija 2 (galerijos katalogas)
   ========================================================== */
:root {
  --blue: #0B3B8C;
  --blue-deep: #072A66;
  --pink: #FF6F91;
  --paper: #F5F6FA;
  --surface: #FFFFFF;
  --ink: #0E1B33;
  --ink-soft: #38425A;     /* dark enough to stay readable on the tinted backgrounds */
  --line: #D9DEE9;

  /* the signature: taken live from the artwork in view */
  --accent: #0B3B8C;
  --accent-ink: #FFFFFF;
  --bg: #F5F6FA;           /* page background: a near-white pastel of the artwork in view */

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --max: 1480px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: var(--blue) var(--paper); accent-color: var(--blue); }
body {
  margin: 0; background: var(--bg); color: var(--ink); transition: background-color 1.1s var(--ease);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1; font-stretch: 112%; font-variation-settings: "wdth" 112; text-wrap: balance; }
p, dd { margin: 0; text-wrap: pretty; }
::selection { background: var(--pink); color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 4px; }

/* signature line: drawn by scrolling, on top of all page content (below the bar and the project view) */
main { position: relative; }
.trace { position: absolute; left: 0; top: 0; z-index: 10; pointer-events: none; overflow: visible; }
/* a thick, see-through blue brushstroke: art and text show through it */
/* transparency on the whole group (not on each piece), so the joins between pieces stay even */
.trace .ink { fill: none; stroke: #8CC8FF; opacity: .5; stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .trace .ink { stroke-width: 15; } }
/* the paintbrush at the tip of the stroke: colourful but see-through, so it never hides the work */
.trace .brush { opacity: .85; transition: opacity .3s var(--ease); }
.trace .brush.idle { opacity: 0; }
.brush-handle { fill: var(--pink); }
.brush-ferrule { fill: #C9CFD9; }
.brush-ferrule-line { stroke: #8E97A6; stroke-width: 1.2; fill: none; }
.brush-bristles { fill: #5A3E2B; }
.brush-paint { fill: #6FB6FF; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- Bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: 16px var(--gutter);
  background: var(--bg);
  border-bottom: 3px solid transparent;
  transition: border-color .6s var(--ease), background-color 1.1s var(--ease);
}
.bar.scrolled { border-bottom-color: var(--accent); }
.wordmark { font-weight: 800; font-variation-settings: "wdth" 112; font-size: 1.05rem; color: var(--blue); text-decoration: none; margin-right: auto; letter-spacing: -.01em; }
.bar nav { display: flex; gap: clamp(.9rem, 2.2vw, 2rem); }
.bar nav a { text-decoration: none; font-weight: 600; color: var(--ink-soft); transition: color .15s; }
.bar nav a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--pink); }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); cursor: pointer; font: 600 .82rem var(--font); }
.lang span { padding: 3px 9px; border-radius: 999px; color: var(--ink-soft); }
.lang span.on { background: var(--ink); color: #fff; }
@media (max-width: 640px) {
  .wordmark { display: none; }
  .bar nav { margin-right: auto; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(110px, 16vh, 170px) 0 clamp(48px, 8vh, 90px); overflow: hidden; }
.hero-text { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.name {
  color: var(--blue); font-weight: 850; font-variation-settings: "wdth" 118;
  letter-spacing: -.045em; line-height: .86; display: flex; flex-direction: column;
  font-size: 12vw; /* refined by fitName() */
}
.name span { display: block; width: fit-content; white-space: nowrap; }
.name span:first-child { color: var(--ink); }
.hero-row {
  margin-top: clamp(1.6rem, 3.5vw, 2.8rem); padding-top: 1.2rem; border-top: 1.5px solid var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem 3rem; align-items: end;
}
.role { font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.35rem); }
.intro { color: var(--ink-soft); max-width: 42ch; margin-top: .25rem; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 760px) { .hero-row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: .8em 1.3em; border-radius: var(--radius); border: 1.5px solid transparent;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-quiet { border-color: var(--ink); color: var(--ink); }
.btn-light { border-color: rgba(255,255,255,.45); color: #fff; background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--blue-deep); }
  .btn-quiet:hover { background: var(--ink); color: #fff; }
  .btn-light:hover { background: #fff; color: var(--blue-deep); border-color: #fff; }
  .bar nav a:hover { color: var(--ink); }
}

/* lateral strip of covers, drifts sideways as you scroll */
.strip-wrap { margin-top: clamp(40px, 7vh, 80px); }
.strip { display: flex; gap: clamp(10px, 1.2vw, 18px); height: clamp(190px, 34vh, 400px); padding-left: var(--gutter); will-change: transform; }
.strip a { flex: none; height: 100%; }
.strip img { height: 100%; width: auto; max-width: none; border-radius: 4px; }

/* ---------- Work ---------- */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(60px, 8vw, 120px); }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; padding-bottom: 1.2rem; border-bottom: 1.5px solid var(--ink); margin-bottom: clamp(28px, 4vw, 56px); }
.work-head h2, .about h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.035em; color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button {
  font: 600 .92rem var(--font); color: var(--ink-soft); background: transparent; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; padding: .42em .95em;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button .n { font-variant-numeric: tabular-nums; opacity: .65; margin-left: .35em; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .filters button:hover { border-color: var(--ink); color: var(--ink); } }
.filters button:active { transform: scale(.97); }

.catalog { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.index { position: sticky; top: 92px; }
.index-panel {
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); padding: 20px 18px 16px;
  transition: background-color .7s var(--ease), color .7s var(--ease);
}
.index-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.index-list a {
  display: flex; justify-content: space-between; gap: .8rem; text-decoration: none;
  padding: .32em .5em; border-radius: 6px; font-weight: 600; opacity: .62;
  transition: opacity .15s var(--ease), background-color .15s var(--ease);
}
.index-list a .y { font-variant-numeric: tabular-nums; font-weight: 500; }
.index-list a[aria-current="true"] { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
@media (hover: hover) and (pointer: fine) { .index-list a:hover { opacity: 1; } }

.items { display: grid; gap: clamp(64px, 10vw, 140px); }
.item { scroll-margin-top: 100px; }
.item > a { display: block; text-decoration: none; color: inherit; }
.item .frame { position: relative; overflow: hidden; border-radius: 4px; background: #E7EAF2; width: fit-content; max-width: 100%; }
.item img { max-height: 78vh; width: auto; transition: transform .45s var(--ease), filter .4s var(--ease); }
.item .loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) { .item > a:hover img { transform: scale(1.02); } .item > a:hover .open { text-decoration-color: var(--pink); } }

.label { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 2rem; margin-top: 1.1rem; max-width: 900px; }
.label h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -.02em; color: var(--ink); }
.label .meta { color: var(--ink-soft); font-weight: 500; grid-column: 1; }
.label .desc { grid-column: 1; max-width: 62ch; margin-top: .45rem; }
.label .open { grid-column: 2; grid-row: 1 / span 2; align-self: start; font-weight: 700; color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: transparent; transition: text-decoration-color .15s; white-space: nowrap; }
.vid { display: inline-flex; align-items: center; gap: .3em; margin-left: .6em; color: #B32C54; font-weight: 700; }

.item.sensitive:not(.shown) img { filter: blur(28px); transform: scale(1.1); }
.gate { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1.2rem; text-align: center; color: #fff; background: rgba(7,42,102,.35); font-weight: 600; }
.gate .btn { background: #fff; color: var(--blue); }
.item.shown .gate { display: none; }

/* every artwork shows a tiny blurred preview of itself until the real image has loaded (never a blank box) */
img.pic { background-size: cover; background-position: center; background-repeat: no-repeat; }

@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .index { display: none; }
  .label { grid-template-columns: 1fr; }
  .label .open { grid-column: 1; grid-row: auto; margin-top: .6rem; }
}

/* ---------- About ---------- */
.about {
  max-width: var(--max); margin: 0 auto; padding: clamp(60px, 9vw, 130px) var(--gutter);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 90px); align-items: start;
  border-top: 1.5px solid var(--ink);
}
.about-photo { margin: 0; }
.about-photo img { width: 100%; border-radius: 4px; }
.bio { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; margin: 1.3rem 0 2.2rem; max-width: 40ch; }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 10rem 1fr; gap: .4rem 1.2rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { color: var(--ink-soft); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--ink); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .facts > div { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: var(--blue-deep); color: #fff; padding: clamp(70px, 11vw, 150px) var(--gutter) 28px; }
/* left edge aligned with the rest of the page, even for narrow children */
.contact > * { margin-left: max(0px, calc((100% - var(--max)) / 2)); margin-right: 0; }
.contact > .foot { max-width: var(--max); }
.contact h2 { font-size: clamp(2.8rem, 9vw, 8rem); letter-spacing: -.045em; font-variation-settings: "wdth" 118; }
.contact-lead { margin-top: 1rem; font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: rgba(255,255,255,.8); max-width: 50ch; }
.email {
  display: block; width: fit-content; margin-top: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; font-variation-settings: "wdth" 112; font-size: clamp(1.5rem, 5.4vw, 4.8rem); letter-spacing: -.03em; line-height: 1.05;
  text-decoration: none; overflow-wrap: anywhere; /* underlined by the drawn line */
}
.contact-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: clamp(1.8rem, 4vw, 2.6rem); }
.contact :focus-visible { outline-color: var(--pink); }
.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: clamp(70px, 10vw, 130px); padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); font-size: .92rem; color: rgba(255,255,255,.75); }
.foot a { text-decoration: none; font-weight: 600; color: #fff; }

/* ---------- Project view ---------- */
.project { position: fixed; inset: 0; z-index: 60; background: var(--bg); transition: background-color 1.1s var(--ease); display: flex; flex-direction: column; }
.project.opening { animation: pIn .35s var(--ease) both; }
.project.closing { animation: pOut .2s var(--ease) both; }
@keyframes pIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pOut { to { opacity: 0; transform: translateY(12px); } }
.p-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 14px var(--gutter); border-bottom: 3px solid var(--accent); background: var(--bg); transition: border-color .6s var(--ease), background-color 1.1s var(--ease); }
.p-step { display: flex; gap: .4rem; }
.p-btn { font: 700 .95rem var(--font); background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--radius); padding: .5em .95em; cursor: pointer; }
.p-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .p-btn:hover { border-color: var(--ink); } }
.p-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.p-layout { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 96px; display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.p-info { position: sticky; top: 24px; }
.p-title { font-size: clamp(2.4rem, 5vw, 4.4rem); letter-spacing: -.035em; color: var(--blue); outline: none; }
.p-meta { margin: 1.4rem 0 0; }
.p-meta > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.p-meta dt { font-weight: 700; }
.p-meta dd { color: var(--ink-soft); }
.p-text { margin-top: 1.4rem; font-size: 1.12rem; line-height: 1.55; }
.p-media { display: grid; gap: clamp(16px, 2.4vw, 32px); }
.p-media figure { margin: 0; }
.p-media img { border-radius: 4px; background: #E7EAF2; }
.p-media img.small { margin-inline: 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--blue-deep); border-radius: 4px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { margin-top: .5rem; font-size: .92rem; }
.video-link a { color: var(--blue); font-weight: 600; }
.p-gate { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.p-media.blurred figure img { filter: blur(30px); }
@media (max-width: 900px) {
  .p-layout { grid-template-columns: 1fr; }
  .p-info { position: static; }
  .p-meta > div { grid-template-columns: 6.5rem 1fr; }
}
@media (max-width: 480px) { .p-close-label { display: none; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: .7em 1.2em; border-radius: var(--radius); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
