/* Huub Reijnders portfolio: one stylesheet, values follow 03_Design/Design_Link.md */

@font-face { font-family: "Bebas Neue"; src: url("../fonts/bebas-neue-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #0F0F0F;
  --surface: #1A1A1A;
  --surface-hover: #202020;
  --surface-2: #232323;
  --text: #EDEBE6;
  --muted: #A6A39D;
  --line: #262626;
  --pill: #444444;
  --accent: #EDEBE6;
  --hover: #FFFFFF;

  --pad: clamp(20px, 4.5vw, 64px);
  --gap-xs: clamp(4px, 1vw, 16px);
  --gap-s: clamp(20px, 2.2vw, 32px);
  --gap-xl: calc(96px + clamp(4px, 1vw, 16px));
  --radius-l: clamp(14px, 1.6vw, 24px);
  --radius-m: clamp(8px, 0.8vw, 12px);
  --tile-pad: clamp(12px, 1.2vw, 16px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--text); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--hover); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--text); color: var(--bg); }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--pad); top: 12px; z-index: 10; padding: 8px 16px; background: var(--text); color: var(--bg); border-radius: 999px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

/* Labels: menu, footer, meta lines, buttons */
.meta { margin: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }

/* Header */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; height: 96px; }
.logo { font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: .02em; }
.nav { display: flex; flex-wrap: wrap; gap: 8px clamp(20px, 2.4vw, 32px); font-size: 16px; }
.nav a { padding: 12px 0; color: var(--muted); }
.nav a:hover { color: var(--hover); }
.nav a[aria-current="page"] { color: var(--accent); }

/* Frames: showreel, project video, photo, panels */
.frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-l); background: var(--surface); overflow: hidden; border: 0; padding: 0; color: inherit; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame .frame-label { position: absolute; left: 0; bottom: 0; padding: clamp(16px, 2.2vw, 32px); color: var(--text); }
button.frame { cursor: pointer; font: inherit; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(64px, 6.5vw, 96px); height: clamp(64px, 6.5vw, 96px); border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; transition: transform .45s var(--ease); }
.play svg { width: 30px; height: 30px; margin-left: 3px; }
button.frame:hover .play, button.frame:focus-visible .play { transform: translate(-50%, -50%) scale(1.08); }
button.frame img { transition: transform .9s var(--ease), opacity .6s ease; }
button.frame:hover img { transform: scale(1.02); opacity: .92; }

.showreel { margin-top: var(--gap-xs); }

/* Project grid */
.grid-section { padding-top: var(--gap-xl); }
.grid-section.no-reel { padding-top: var(--gap-xs); }
.grid { --cols: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap-s); }
.grid > .tile { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap-s)) / var(--cols)); }
@media (min-width: 720px) { .grid { --cols: 2; } }
@media (min-width: 1180px) { .grid { --cols: 3; } }

/* Tile: a project card in its own surface, used on home and for "Volgend project" */
.tile { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; padding: var(--tile-pad) var(--tile-pad) var(--gap-s); border-radius: var(--radius-l); background: var(--surface); transition: background-color .4s ease; }
.tile:hover { background: var(--surface-hover); color: var(--text); }
.tile .media { width: 100%; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-2); }

/* Tile picture: 16:9, wider films cropped to fit. */
.pic { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.pic img, .pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic video { opacity: 0; transition: opacity .35s ease; }
.pic.moving video { opacity: 1; }
.runtime { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: var(--text); font-family: var(--mono); font-size: 12px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.tile .text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tile .ttl { margin: 0; font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: .01em; transition: color .3s ease; }
.tile:hover .ttl { color: var(--hover); }

/* Titles */
.page-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 7vw, 104px); line-height: .9; letter-spacing: .01em; text-wrap: balance; }

.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 1px solid var(--pill); border-radius: 999px; font-size: 15px; color: var(--text); transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
.pill:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Panels: title panel and text panel, used on project and about */
.panel { border-radius: var(--radius-l); background: var(--surface); padding: clamp(28px, 3.6vw, 56px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; text-align: center; }
.panel p { margin: 0; max-width: 720px; text-wrap: pretty; }
.panel .lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; }
.panel .sub { color: var(--muted); }
.title-panel { gap: 8px; }
.texts { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* Project page */
.project-video { margin-top: var(--gap-xs); }
#content > .project-video + .panel, #content > .panel + .panel { margin-top: var(--gap-s); }

/* Next project */
.next { margin-top: var(--gap-xl); display: flex; flex-direction: column; align-items: center; gap: 20px; }
.next .tile { width: 100%; max-width: 416px; }

/* About */
.about-grid { margin-top: var(--gap-xs); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--gap-s); align-items: stretch; }
.photo { aspect-ratio: 4 / 5; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.about-col { display: flex; flex-direction: column; gap: var(--gap-s); }
.about-col .text-panel { flex: 1; gap: 40px; }

/* Not found */
.empty { padding: var(--gap-xl) 0 0; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }

/* Footer */
.site-footer { margin-top: var(--gap-xl); border-top: 1px solid var(--line); min-height: 96px; display: flex; justify-content: center; align-items: center; text-align: center; }

/* Motion
   One moment carries the site: the picture of the clicked tile grows into the big player
   on the project page (browsers that support page transitions). Tiles play their preview
   loop while you point at them. Nothing else animates on its own. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }
::view-transition-old(root) { animation: .3s ease both vt-out; }
::view-transition-new(root) { animation: .45s var(--ease) .05s both vt-in; }
::view-transition-group(hero) { animation-duration: .6s; animation-timing-function: cubic-bezier(.3, .7, .1, 1); }
::view-transition-old(hero), ::view-transition-new(hero) { height: 100%; object-fit: cover; overflow: hidden; }
::view-transition-image-pair(hero) { border-radius: var(--radius-l); overflow: hidden; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
