/* =========================================================
   Alina Tikhonova — portfolio
   Minimal static site. One shared stylesheet.
   ========================================================= */

/* ---- self-hosted fonts ---- */
@font-face {
  font-family: "Ortica Linear";
  src: url("../fonts/OrticaLinear-Light.woff2") format("woff2"),
       url("../fonts/OrticaLinear-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ortica Linear";
  src: url("../fonts/OrticaLinear-Regular.woff2") format("woff2"),
       url("../fonts/OrticaLinear-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ortica Linear";
  src: url("../fonts/OrticaLinear-Bold.woff2") format("woff2"),
       url("../fonts/OrticaLinear-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ortica Angular";
  src: url("../fonts/OrticaAngular-Bold.woff2") format("woff2"),
       url("../fonts/OrticaAngular-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cirrus Cumulus";
  src: url("../fonts/CirrusCumulus.woff") format("woff"),
       url("../fonts/CirrusCumulus.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* black + grain palette */
  --bg: #000000;
  --fg: #eaeaea;
  --muted: #808080;
  --line: #1e1e1e;
  --placeholder: #141414;
  --placeholder-text: #444444;
  --maxw: 1400px;
  --gap: 24px;
  --pad: 32px;
  /* active font — swap this line to test another: "Cirrus Cumulus" or "Ortica Angular" */
  --font: "Ortica Linear", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* film grain overlay across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.8'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='160'%20height='160'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* stronger, more visible film grain on the grid pages */
body.grainy::before { opacity: 0.14; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.55; }
img, video, iframe { max-width: 100%; display: block; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--pad);
  background: var(--bg);
  mix-blend-mode: normal;
}

/* homepage: transparent header laid over the full-screen hero (no black bar on top) */
.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
}
/* homepage is just the full-screen image — kill main's padding so no black strip */
.home main { padding: 0; }

.site-name {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
  text-transform: lowercase;
}
.site-nav a.active { color: var(--fg); }

.nav-toggle { display: none; }

/* ---------- Layout ---------- */
main { padding: 0 var(--pad) 96px; }

.page-narrow {
  max-width: 620px;
  margin: 0 auto;
  padding-top: 12vh;
}

/* ---------- Home landing (belén-style: big statement + corner columns) ---------- */
/* full-bleed images, edge to edge, regardless of main's padding */
.full-img {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: var(--placeholder);
  overflow: hidden;
}
/* real images show at their natural aspect, full width, no crop */
.full-img img { width: 100%; height: auto; display: block; }
.full-img.placeholder {
  height: 58vh;
  min-height: 340px;
  display: flex; align-items: center; justify-content: center;
  color: var(--placeholder-text); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
}
.full-img.bottom { margin-top: 12vh; }

/* full-screen hero VIDEO on the homepage (autoplay muted loop) */
.full-img.hero-video { height: 100vh; position: relative; overflow: hidden; background: #000; }
.full-img.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* fill the screen edge-to-edge, no black bars, no extra zoom */
  display: block;
  /* darker, gentle contrast, like the old still image */
  filter: brightness(0.85) contrast(1.06);
}

/* full-screen hero on the homepage */
.full-img.hero { height: 100vh; position: relative; overflow: hidden; }
/* image only slightly dimmed so the drifting light reads as gentle highlights */
.full-img.hero img {
  height: 100%;
  object-fit: cover;
  /* base down — the moving light is what reveals the picture where it falls */
  filter: brightness(0.82) contrast(1.06);
  /* raise the composition (face higher); slight scale fills the gap */
  transform-origin: top center;
  transform: translateY(-4.5cm) scale(1.2);
}

/* two soft, very diffuse cool glows drifting across the image — a subtle,
   holographic play of light (brighter where they fall) rather than a swinging bar */
.full-img.hero::before,
.full-img.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(85px);
}
.full-img.hero::after {
  left: -25%; width: 150%; bottom: -30%; height: 110%;
  /* soft cool light that drifts with the reveal (gentle, wider) */
  background: radial-gradient(circle at 50% 66%,
    rgba(222, 233, 255, 0.16),
    rgba(222, 233, 255, 0.05) 32%,
    rgba(222, 233, 255, 0) 64%);
  animation: light-a 17s linear infinite;
}
.full-img.hero::before {
  left: -25%; width: 150%; bottom: -24%; height: 105%;
  /* the reveal — lifts the picture's own colour where the light falls (wider) */
  mix-blend-mode: color-dodge;
  background: radial-gradient(circle at 50% 64%,
    rgba(255, 255, 255, 0.40),
    rgba(255, 255, 255, 0.26) 18%,
    rgba(255, 255, 255, 0.08) 36%,
    rgba(255, 255, 255, 0) 56%);
  animation: light-b 22s linear infinite;
}
/* travel along the bottom and rise toward the side corners */
/* arc that pauses in each corner, then slowly sweeps a new arc:
   hold at a corner → glide through the bottom → hold in the other corner → back */
/* the glow travels fully off one side and drifts back in — it leaves and
   re-enters the frame in motion, never parking or blinking at a corner */
@keyframes light-a {
  0%   { transform: translate(-72%, -30%); }  /* off the left, high */
  25%  { transform: translate(0%, 12%); }     /* low, through the centre */
  50%  { transform: translate(72%, -30%); }   /* off the right, high */
  75%  { transform: translate(0%, 12%); }
  100% { transform: translate(-72%, -30%); }
}
@keyframes light-b {
  0%   { transform: translate(68%, 8%); }     /* off the right, low */
  25%  { transform: translate(0%, -26%); }    /* high, through the centre */
  50%  { transform: translate(-68%, 8%); }    /* off the left, low */
  75%  { transform: translate(0%, -26%); }
  100% { transform: translate(68%, 8%); }
}
/* mobile: much smaller horizontal travel so the glow stays on the narrow screen */
@keyframes light-a-mobile {
  0%   { transform: translate(-30%, -24%); }
  25%  { transform: translate(0%, 14%); }
  50%  { transform: translate(30%, -24%); }
  75%  { transform: translate(0%, 14%); }
  100% { transform: translate(-30%, -24%); }
}
@keyframes light-b-mobile {
  0%   { transform: translate(28%, 10%); }
  25%  { transform: translate(0%, -20%); }
  50%  { transform: translate(-28%, 10%); }
  75%  { transform: translate(0%, -20%); }
  100% { transform: translate(28%, 10%); }
}
@media (prefers-reduced-motion: reduce) {
  .full-img.hero::before,
  .full-img.hero::after { animation: none; transform: none; }
}

.statement {
  font-size: clamp(36px, 6.6vw, 104px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 8vh 0 11vh;
}

/* "liquid" text — a slow light shimmer running across the letters,
   like a wet/glass reflection (iOS-ish). Text stays legible. */
.liquid {
  background: linear-gradient(
    100deg,
    #7a7a7a 0%,
    #efefef 18%,
    #b8b8b8 34%,
    #ffffff 50%,
    #a8a8a8 66%,
    #e6e6e6 82%,
    #6f6f6f 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: liquid-shimmer 9s ease-in-out infinite;
}
@keyframes liquid-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .liquid { animation: none; }
}

.home-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  margin-top: 10vh;
  font-size: 14px;
  line-height: 1.55;
  padding-bottom: 2vh;
}
.home-col { max-width: 460px; }
.home-col.col-about { max-width: 540px; text-align: justify; text-justify: inter-word; }
.home-col.col-contact { max-width: 260px; }
.home-col h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.home-col p + p { margin-top: 0.85em; }

/* ---------- Works grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px var(--gap);
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 8px;
}

.card { display: block; }

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--placeholder);
  overflow: hidden;
}
.card-media img,
.card-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card:hover .card-media img { opacity: 0.9; }

/* placeholder look while there are no real images yet */
.card-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--placeholder-text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 14px;
}
.card-title { font-weight: 400; }
.card-year { color: var(--muted); white-space: nowrap; }
.card-medium { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Project page ---------- */
.project-head {
  max-width: 720px;
  margin: 12vh auto 6vh;
  text-align: left;
}
.project-title {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  margin-bottom: 6px;
}
.project-sub { color: var(--muted); font-size: 14px; }

.project-body { max-width: 760px; margin: 0 auto; }
.project-text {
  max-width: 620px;
  margin: 36px auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  text-align: justify;
}
.media-block { margin: 36px 0; }
.media-block img,
.media-block video { display: block; width: 100%; }
/* centred container for portrait media (e.g. vertical video) */
.media-portrait { max-width: 400px; margin-left: auto; margin-right: auto; }

/* ---------- Image gallery (arrow carousel) ---------- */
.gallery { position: relative; margin: 36px 0; }
.gallery-viewport { overflow: hidden; height: 62vh; }
.gallery-track { display: flex; height: 100%; transition: transform 0.45s ease; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--fg);
  font-family: var(--font);
  font-size: 34px;
  line-height: 1;
  padding: 16px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.25s ease;
  user-select: none;
}
.gallery-arrow:hover { opacity: 1; }
.gallery-arrow.prev { left: 0; }
.gallery-arrow.next { right: 0; }
.gallery-count { text-align: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.gallery-label { font-size: 14px; color: var(--muted); margin: 36px 0 6px; text-transform: lowercase; }

/* ---------- Lightbox (click a project image to enlarge) ---------- */
.project-body img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vmin;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  font-family: var(--font);
  font-size: 44px;
  line-height: 1;
  padding: 20px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.25s ease;
  z-index: 2;
}
.lb-arrow:hover { opacity: 1; }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }

/* ---------- Back link on project pages ---------- */
.back-link {
  display: inline-block;
  margin-top: 26px;
  font-size: 14px;
  color: var(--muted);
  text-transform: lowercase;
}
.back-link:hover { color: var(--fg); }

/* responsive 16:9 embed */
.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
/* portrait embed (e.g. YouTube Shorts) */
.embed.embed-portrait { aspect-ratio: 9 / 16; }
.embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---------- About / text pages ---------- */
.bio {
  font-size: 14px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
}
.bio p + p { margin-top: 1.3em; }
.bio img { display: block; width: 100%; margin-top: 1.3em; }

/* about page: full-screen image with the bio overlaid (like the homepage) */
.about-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  overflow: hidden;
}
.about-hero > img { width: 100%; height: 100%; object-fit: cover; }
/* light scrim, mostly at the top for nav legibility */
.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.04) 22%,
    transparent 50%,
    rgba(0, 0, 0, 0.10) 100%);
}
/* bio centred over the sphere, sitting inside the composition */
.about-hero .about-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad);
  z-index: 2;
}
.about-hero .about-text .bio {
  max-width: 400px;
  color: #9c9c9c;
  text-align: center;
  transform: translateX(-0.6cm);
}

/* contact page: full-screen image with bright contact links on the right */
.contact-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  overflow: hidden;
}
.contact-hero > img { width: 100%; height: 100%; object-fit: cover; }
.contact-hero .contact-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 0 var(--pad);
  transform: translateY(1.2cm);
  z-index: 2;
}
.contact-hero .contact-over a {
  display: block;
  font-size: 14px;
  color: #ffffff;
  line-height: 2.1;
  letter-spacing: 0.02em;
}
.contact-hero .contact-over a:hover { opacity: 0.6; }

.contact-list {
  font-size: 18px;
  line-height: 2;
  list-style: none;
}
.contact-label { color: var(--muted); display: inline-block; width: 110px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--pad);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 36px 18px; }
}
@media (max-width: 600px) {
  :root { --pad: 18px; }
  .grid { grid-template-columns: 1fr; gap: 30px; }

  /* header stacks: brand on top, nav underneath */
  .site-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav { gap: 18px; font-size: 13px; }

  /* about overlay text: drop the desktop nudge, fit the screen */
  .about-hero .about-text .bio { transform: none; max-width: 100%; }

  /* homepage hero: nudge the centre-crop left so the face is centred on mobile */
  .full-img.hero img { object-position: 56.2% center; transform: none; }
  /* homepage hero video: centre the skull face on the tall mobile crop */
  .full-img.hero-video video { object-position: calc(50% - 1.5cm) center; }
  /* smaller light travel so the moving glow stays visible on a narrow screen */
  .full-img.hero::after { animation-name: light-a-mobile; }
  .full-img.hero::before { animation-name: light-b-mobile; }

  /* project pages full width */
  .project-head, .project-body { max-width: 100%; }
  .project-head { margin: 14vh auto 5vh; }

  /* left-align body copy on narrow screens (justify makes ugly word rivers) */
  .project-text, .bio, .home-col.col-about { text-align: left; }

  /* galleries a touch shorter so landscape frames don't over-letterbox on tall phones */
  .gallery-viewport { height: 52vh; }

  /* portrait video a bit wider on small screens */
  .media-portrait { max-width: 320px; }
}

