/* Richie Starzec: portfolio styles.
   To switch to a light look, change the four color variables below. */
:root {
  --bg: #0b0b0b;
  --fg: #ececec;
  --muted: #8d8d8d;
  --line: #262626;
  --max: 1280px;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; gap: 12px 32px;
  justify-content: space-between; align-items: center;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 22px var(--pad);
}
.wordmark { text-decoration: none; font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 8px clamp(16px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  text-decoration: none; font-size: .85rem; letter-spacing: .12em; text-transform: lowercase;
  color: var(--muted); transition: color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }

/* Main + footer */
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 72px; }
main.wide { max-width: none; padding: 0; }
.site-footer {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 40px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; letter-spacing: .08em;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.site-footer .links { display: flex; gap: 22px; }

h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0; }
.page-title { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 24px 0 36px; font-weight: 400; }

/* Home tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: calc(100vh - 150px); min-height: 460px; }
.tile { position: relative; display: block; overflow: hidden; text-decoration: none; background: #151515; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, filter .4s; filter: brightness(.7); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); filter: brightness(.9); }
.tile span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(1.1rem, 2.4vw, 1.8rem); letter-spacing: .3em; text-transform: uppercase; text-indent: .3em;
}

/* Directing projects */
.project { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: 0 0 clamp(48px, 7vw, 88px); }
.project + .project { padding-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.project h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 14px; }
.project p { margin: 0 0 14px; color: #cfcfcf; max-width: 46ch; }
.project .meta { color: var(--muted); font-size: .9rem; font-style: italic; }
.project .genre { color: var(--muted); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; display: block; }
.text-link { display: inline-block; margin-top: 8px; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--muted); padding-bottom: 3px; }
.text-link:hover { border-color: var(--fg); }
.soon { color: var(--muted); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }

/* Video facade */
.video { position: relative; aspect-ratio: 16 / 9; background: #151515; overflow: hidden; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video button {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer;
  background: rgba(0,0,0,.25); color: #fff; display: grid; place-items: center; transition: background .2s;
}
.video button:hover { background: rgba(0,0,0,.05); }
.video button .play {
  width: 74px; height: 74px; border-radius: 50%; border: 1.5px solid #fff; display: grid; place-items: center;
  background: rgba(0,0,0,.35); backdrop-filter: blur(4px);
}
.video button .play::before { content: ""; margin-left: 5px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }

/* Photography grid */
.gallery { columns: 3; column-gap: 14px; }
.gallery figure { margin: 0 0 14px; break-inside: avoid; position: relative; }
.gallery img { width: 100%; height: auto; cursor: zoom-in; background: #151515; }
.gallery figcaption { margin-top: 6px; font-size: .78rem; letter-spacing: .06em; color: var(--muted); }
.gallery figure.missing img { display: none; }
.gallery figure.missing { background: #131313; border: 1px dashed #333; aspect-ratio: 3 / 2; display: grid; place-items: center; text-align: center; padding: 16px; }
.gallery figure.missing figcaption { margin: 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox img { max-height: calc(100vh - 110px); width: auto; margin: 0 auto; }
.lightbox figcaption { margin-top: 12px; color: var(--muted); font-size: .85rem; letter-spacing: .06em; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; padding: 14px 18px; opacity: .75; line-height: 1; }
.lightbox button:hover { opacity: 1; }
.lightbox .close { top: 8px; right: 10px; }
.lightbox .prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 6px; top: 50%; transform: translateY(-50%); }

/* Press */
.press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.press-grid figure { margin: 0; }
.press-grid figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about .photos { display: grid; gap: 14px; }
.about .bio p { margin: 0 0 1.2em; max-width: 58ch; color: #d6d6d6; font-size: 1.05rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.contact h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 6px; }
.contact .sub { color: var(--muted); margin: 0 0 40px; }
.contact h2 { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 0 0 10px; }
.contact p { margin: 0 0 28px; }
.contact a { text-decoration: none; border-bottom: 1px solid var(--muted); }
.contact a:hover { border-color: var(--fg); }

/* 404 */
.center { min-height: 50vh; display: grid; place-items: center; text-align: center; }

@media (max-width: 900px) {
  .gallery { columns: 2; }
  .project, .about, .contact { grid-template-columns: 1fr; }
  .press-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .tile { height: 44vh; min-height: 240px; }
  .gallery { columns: 1; }
  .press-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
