/* Marios Tsipopoulos — portfolio
   Gritty, urban, new school: true black, film grain over everything,
   heavy condensed capitals for names and titles (Fira Sans Extra Condensed),
   Commissioner (Kostas Bartsokas) for reading text. */

@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-latin-ext-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-greek-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/fira-sans-extra-condensed-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/fira-sans-extra-condensed-latin-ext-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/fira-sans-extra-condensed-greek-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/fira-sans-extra-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("../fonts/fira-sans-extra-condensed-greek-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
  --black: #000;
  --ink: #f0f0ec;
  --dim: #85857f;
  --rule: #2b2b29;

  --sans: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fira Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;

  --gutter: clamp(20px, 3.2vw, 48px);
  --bar-min: 150px;
  /* Full-bleed width; on short screens the frame letterboxes harder instead of pillarboxing */
  --small: 15px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 360;
  line-height: 1.6;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Film grain over the whole page, images included */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
a:hover { color: #fff; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 60;
  background: var(--ink); color: var(--black); padding: 8px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Heavy condensed capitals: names, page titles, section heads, work titles */
.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.005em;
}

cite { font-style: normal; font-variation-settings: "slnt" -10; }

/* ---------- Navigation ---------- */

.topnav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 22px var(--gutter);
  font-size: var(--small);
}
.topnav ul { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding: 0; list-style: none; }
.topnav a { text-decoration: none; color: var(--dim); }
.topnav a:hover, .topnav a[aria-current="page"], .topnav .lang { color: var(--ink); }

/* ---------- Home hero: one frame from the work fills the screen, the name runs edge to edge ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 540px;
  background: #000; color: #fff;
}
.hero .topnav { position: absolute; inset: 0 0 auto 0; }
.hero .topnav a { color: rgb(255 255 255 / 0.8); }
.hero .topnav a:hover, .hero .topnav .lang { color: #fff; }

/* Picture and name sit at slightly different depths; main.js parts them a little with the mouse */
.hero-media {
  position: absolute; inset: -3%; z-index: -2;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
}
.hero-still {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  transition: opacity 0.9s ease;
}
.hero-still.is-next { opacity: 0; }
.hero-still.is-next.is-in { opacity: 1; }
/* Shade the top for the menu and the bottom for the name */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0.42), transparent 20%, transparent 50%, rgb(0 0 0 / 0.62));
}

.hero-foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(12px, 2.2vh, 26px);
  display: grid; row-gap: 10px;
  container-type: inline-size;
  transform: translate3d(var(--nx, 0px), var(--ny, 0px), 0);
}
.hero-role { margin: 0; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.3; }
/* The name is sized off its measured width at 1px (--name-r, set in build.py):
   --name-w of the width on large screens, the full width on phones */
.hero-name {
  --name-w: 0.66;
  margin: 0; white-space: nowrap;
  font-size: calc((100vw - 2 * var(--gutter)) * var(--name-w) / var(--name-r, 8.5));
  font-size: calc(100cqw * var(--name-w) / var(--name-r, 8.5));
  line-height: 0.78; letter-spacing: -0.005em;
}

/* ---------- Circle cursor (mouse only, added by main.js) ---------- */

html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0; border-radius: 50%;
  opacity: 0; transition: opacity 200ms ease;
  mix-blend-mode: difference;
}
.cursor.is-visible .cursor-dot, .cursor.is-visible .cursor-ring { opacity: 1; }
.cursor.is-hidden .cursor-dot, .cursor.is-hidden .cursor-ring { opacity: 0; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor-ring {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid #fff;
  transition: opacity 200ms ease, width 300ms ease, height 300ms ease, margin 300ms ease, background-color 300ms ease;
}
.cursor.is-link .cursor-ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.is-link .cursor-dot, .cursor.is-work .cursor-dot { opacity: 0; }
.cursor.is-work .cursor-ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #fff; mix-blend-mode: normal; }
.cursor-label { color: #000; font-size: 13px; opacity: 0; transition: opacity 200ms ease; }
.cursor.is-work .cursor-label { opacity: 1; }

/* ---------- Sections ---------- */

main { position: relative; z-index: 1; }

.section {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(96px, 11vw, 168px) var(--gutter) 0;
}

.section-title { margin: 0 0 32px; font-size: clamp(30px, 3vw, 50px); }

/* ---------- Bio (home) ---------- */

.bio-section { padding-top: clamp(56px, 6vw, 96px); }


.bio-body {
  display: grid;
  grid-template-columns: minmax(0, 38em) minmax(0, 24em);
  justify-content: space-between;
  align-items: start;
  gap: 64px;
}
.bio p {
  margin: 0 0 1.1em;
  max-width: 36em;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.68;
}

.facts {
  position: sticky; top: 32px;
  margin: 6px 0 0; border-top: 1px solid var(--rule); font-size: var(--small);
}
.facts div {
  display: grid; grid-template-columns: 8.5em 1fr; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--rule);
}
.facts dt { color: var(--dim); }
.facts dd { margin: 0; }

/* ---------- Links to the two sections: names only, as rows ---------- */

.doors { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.doors li { border-bottom: 1px solid var(--rule); }
.doors a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px;
  align-items: baseline; padding: 22px 0 20px; text-decoration: none;
}
.door-title { margin: 0; font-size: clamp(32px, 3.6vw, 56px); }
.door-desc { margin: 0; color: var(--dim); font-size: var(--small); }
.doors a:hover .door-title { color: var(--dim); }

/* End-credits block: centred, one name per line */
.clients { text-align: center; }
.clients h2 { margin: 0 0 22px; font-size: var(--small); font-weight: 360; color: var(--dim); }
.clients ul { margin: 0; padding: 0; list-style: none; font-size: clamp(19px, 1.5vw, 23px); line-height: 2.05; font-weight: 340; }

/* ---------- Section pages ---------- */

.page-head { position: relative; z-index: 1; }
.page-head > :not(.topnav) { padding-inline: var(--gutter); }
.page-name { margin: clamp(64px, 9vw, 140px) 0 14px; font-size: var(--small); }
.page-name a { color: var(--dim); text-decoration: none; }
.page-name a:hover { color: var(--ink); }
.page-title { margin: 0; font-size: clamp(48px, 6.4vw, 112px); }
.page-intro { margin: 22px 0 0; max-width: 34em; color: var(--dim); font-size: clamp(17px, 1.4vw, 21px); }

.work { padding-top: clamp(56px, 6vw, 96px); }

.filters { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 28px; padding: 0; list-style: none; }
.filters button {
  padding: 6px 0; border: 0; background: none;
  color: var(--dim); font: inherit; font-size: var(--small); cursor: pointer;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px;
}

/* The credit list: one row per piece of work */
.credits { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.credit { border-bottom: 1px solid var(--rule); transition: color 160ms ease; }
.credit[hidden] { display: none; }
.credit-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 8px 32px;
  align-items: baseline;
  padding: 22px 0 20px;
  color: inherit;
  text-decoration: none;
}
a.credit-body { cursor: pointer; }
a.credit-body:hover { color: inherit; }
a.credit-body:focus-visible { outline-offset: -2px; }
.credit-thumb { display: none; }
.credit-title { margin: 0; font-size: clamp(30px, 3.4vw, 56px); }
.credit-note { margin: 10px 0 0; font-size: var(--small); }
.credit-role, .credit-kind { margin: 0; font-size: var(--small); color: var(--dim); }
.credit-kind { text-align: right; }

/* Hovering a row puts its still behind the whole list, like credits over picture */
.preview {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
}
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview.is-on { opacity: 0.42; }

@media (hover: hover) and (min-width: 761px) {
  .credits:hover .credit { color: var(--dim); }
  .credits:hover .credit:hover { color: var(--ink); }
  .credits:hover .credit:hover .credit-role,
  .credits:hover .credit:hover .credit-kind { color: var(--ink); }
}

/* Video player */
.player {
  width: min(94vw, 1600px); max-width: none; max-height: none;
  padding: 48px 0 0; border: 0; background: transparent; color: var(--ink);
}
.player::backdrop { background: rgb(0 0 0 / 0.95); }
.player-close {
  position: absolute; top: 0; right: 0;
  padding: 8px 0; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: var(--small); cursor: pointer;
}
.player-close:hover { color: var(--dim); }
.player-frame { aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Stills viewer: same dialog, the frame follows the image */
.player.is-gallery .player-frame { aspect-ratio: auto; background: none; }
.player-frame img {
  display: block; width: 100%; height: auto; max-height: calc(100svh - 150px);
  object-fit: contain; cursor: pointer; user-select: none;
}
.gallery-nav {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 14px; font-size: var(--small);
}
.gallery-nav[hidden] { display: none; }
.gallery-nav button {
  padding: 8px 0; border: 0; background: none; color: var(--ink);
  font: inherit; cursor: pointer;
}
.gallery-nav button:hover { color: var(--dim); }
.gallery-count { color: var(--dim); font-variant-numeric: tabular-nums; }

.dev-list { margin: 0; border-top: 1px solid var(--rule); }
.dev-list div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.dev-list dt { font-size: clamp(30px, 3.4vw, 52px); }
.dev-list dd { margin: 0; padding-top: 6px; color: var(--dim); max-width: 34em; }

/* ---------- Contact ---------- */

.contact-lead { margin: 0 0 14px; color: var(--dim); }
.contact-email { margin: 0; }
.contact-email a {
  font-size: clamp(19px, 1.7vw, 26px);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--dim);
  overflow-wrap: anywhere;
}
.contact-email a:hover { text-decoration-color: currentColor; }
.contact-more {
  display: flex; flex-wrap: wrap; gap: 12px 48px;
  margin-top: 32px; font-size: var(--small);
}
.contact-more p { margin: 0; }
.social { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.contact-more a { text-decoration: none; }
.contact-more a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Footer ---------- */

.footer {
  position: relative; z-index: 1;
  max-width: 1600px;
  margin: clamp(120px, 14vw, 220px) auto 0;
  padding: 0 var(--gutter) 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 14px; color: var(--dim);
}
.footer p { margin: 0; }
.footer a { text-decoration: none; }

/* ---------- Small screens: a widescreen film watched on a phone held upright ---------- */

@media (max-width: 760px) {
  :root { --small: 14px; }
  body { font-size: 16px; }
  .topnav ul { gap: 4px 18px; }
  .hero-foot { row-gap: 6px; }
  .hero-name { --name-w: 1; }
  .page-title { font-size: clamp(40px, 12.5vw, 76px); }
  .bio-body { grid-template-columns: 1fr; gap: 48px; }
  .facts { position: static; }
  .facts div { grid-template-columns: 7.5em 1fr; }
  .doors a { grid-template-columns: 1fr; gap: 4px; }
  .dev-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* No hover on phones: each row carries its own frame instead */
@media (hover: none), (max-width: 760px) {
  .preview { display: none; }
  .credits { border-top: 0; }
  .credit { border-bottom: 0; }
  .credit-body { grid-template-columns: 1fr; gap: 6px; padding: 0 0 40px; }
  .credit-thumb {
    display: block; width: 100%; height: auto; margin-bottom: 14px;
    aspect-ratio: 2.39 / 1; object-fit: cover; background: #000;
  }
  .credit-kind { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media, .hero-foot { transform: none; }
  .preview, .credit { transition: none; }
}
