/* Marco Markovich Photography — restrained editorial palette */
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url('/fonts/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  --black: #171717;
  --white: #F0EBE2;
  --off-white: #F0EBE2;
  --surface: #262626;
  --muted: #A8A49E;
  --accent: #A34A3A;
  --bar: #262626;
  --card: #262626;
  --frame: #262626;
  --grey-page: #171717;
  --radius: 20px;
  --radius-sm: 6px;
  --content: 1226px;
  --gutter: calc(50% - 624px); /* left edge of the content column (96px at 1440) */
  --font-nav: 'IBM Plex Mono', monospace;
  --font-logo: 'Manrope', sans-serif;
  --font-small: 'IBM Plex Mono', monospace;
  --font-body: 'Manrope', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black) url('/grain.png') repeat; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: relative;
  height: 97px;
  background: linear-gradient(to bottom, var(--black) 0%, var(--black) 22%, rgba(23, 23, 23, 0.82) 100%);
  z-index: 20;
}
/* the rounded bar is drawn behind; logo and menu sit side by side in the header */
.site-header::before {
  content: '';
  position: absolute;
  top: 20px;
  left: var(--gutter);
  width: var(--content);
  height: 68px;
  border-radius: var(--radius);
  background: var(--bar);
}
.header-bar { display: contents; }
.logo { position: absolute; top: 20px; left: calc(var(--gutter) + 21px); display: block; }
.logo img { width: 300px; height: 68px; max-width: 100%; object-fit: contain; object-position: left center; }
.site-nav { position: absolute; top: 34px; right: calc(100% - var(--gutter) - var(--content) + 39px); display: flex; }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  padding: 8px 12px; background: var(--surface); color: var(--white);
  font: 400 11px var(--font-nav); border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 8px; }
.slide-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); font-size: 12px; }
.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 96px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.site-nav a:nth-child(3) { width: 203px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.menu-toggle { display: none; }

/* ---------- main ---------- */
.site-main { position: relative; background: var(--black); }
.site-main.main-grey { background: var(--grey-page); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  height: 53px;
  display: block;
  background: linear-gradient(to bottom, var(--black) 0%, var(--black) 25%, rgba(23, 23, 23, 0.82) 100%);
}
.footer-copy { position: absolute; top: 12px; left: 50%; width: 220px; height: 28px; padding-top: 5px; transform: translateX(-50%); }
.copyright {
  width: 220px;
  height: 17px;
  line-height: 17px;
  display: block;
  font-family: var(--font-small);
  font-weight: 300;
  font-size: 8px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- slideshows ---------- */
.slideshow { position: relative; overflow: hidden; display: block; }
.slideshow .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slideshow .slide.is-active { opacity: 1; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- home ---------- */
.page-home .site-main { height: 1061px; }
.home { position: absolute; inset: 0; }
.tagline {
  position: absolute; top: 276px; right: calc(var(--gutter) + 27px);
  width: 34px; height: 101px; overflow: hidden;
  font-size: 6px; line-height: 1.4; color: #000; z-index: 0;
}
.hero { z-index: 1; background: var(--surface); }
.hero-link { position: absolute; inset: 0; z-index: 1; }
.ss-prev, .ss-next {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 34px; height: 46px; border: 0; background: rgba(38, 38, 38, 0.82); color: var(--white);
  font: 300 30px/1 var(--font-nav); cursor: pointer; opacity: 0.45; transition: opacity 0.25s;
}
.ss-prev { left: 0; }
.ss-next { right: 0; }
.slideshow:hover .ss-prev, .slideshow:hover .ss-next, .ss-prev:focus-visible, .ss-next:focus-visible { opacity: 1; }
.hero {
  position: absolute;
  top: 11px;
  left: var(--gutter);
  width: var(--content);
  height: 817px;
}

/* ---------- about ---------- */
.page-about .site-main { min-height: calc(100vh - 150px); padding: 24px 0 46px; }
.card { background: var(--card); border-radius: var(--radius); }
.about-simple {
  width: var(--content); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr); gap: 16px;
}
.about-portrait { min-height: 620px; border-radius: var(--radius); overflow: hidden; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 46% center; }
.about-info { padding: 52px 44px 44px; display: flex; flex-direction: column; justify-content: center; }
.about-kicker { font: 600 12px/1.4 var(--font-small); letter-spacing: 0.18em; color: var(--accent); }
.about-info h1 { margin-top: 15px; font: 600 36px/1.12 var(--font-logo); letter-spacing: -0.025em; color: var(--off-white); }
.about-bio { margin-top: 34px; }
.about-bio p { font: 400 16px/1.55 var(--font-body); color: var(--white); }
.about-bio p + p { margin-top: 22px; }
.about-links { margin-top: 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.about-contact, .about-series-link { font: 400 13px/1.5 var(--font-small); text-underline-offset: 4px; }
.about-contact { text-decoration-color: var(--accent); }
.about-series-link { color: var(--muted); text-decoration: none; }
.about-contact:hover, .about-series-link:hover { color: var(--accent); }
.about-social { margin-top: 28px; }
.about-social ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.about-social a {
  width: 39px; height: 39px; border-radius: 50%;
  background: var(--accent); color: var(--off-white);
  display: flex; align-items: center; justify-content: center;
}
.about-social svg { width: 23px; height: 23px; }

/* ---------- series landing ---------- */
.page-series .site-main.main-grey { height: 677px; }
.series-grid { width: var(--content); min-height: 100%; margin: 0 auto; padding: 16px 0 120px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.series-tile {
  position: relative;
  display: block;
  height: 250px;
  background: var(--frame);
  border-radius: var(--radius);
  text-decoration: none;
}
.series-tile img { position: absolute; inset: 13px; width: calc(100% - 26px); height: calc(100% - 26px); object-fit: cover; background-color: #28262600; transition: filter 0.3s; }
.series-tile span {
  position: absolute;
  font-family: var(--font-nav);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--off-white);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
}
.series-tile:hover img { filter: brightness(0.7); }

/* ---------- series gallery pages ---------- */
.gallery-page { width: var(--content); margin-left: var(--gutter); padding: 16px 0 60px; }
.gallery-head { padding: 28px 30px; margin-bottom: 20px; }
.gallery-head h1 { font-family: var(--font-logo); font-size: 23px; letter-spacing: 0.04em; margin-bottom: 12px; }
.gallery-head p { font-family: var(--font-body); font-size: 16px; line-height: 1.4; }
.gallery-head .muted { color: var(--muted); }
.gallery-head .back { display: inline-block; margin-top: 14px; font-size: 13px; letter-spacing: 0.1em; text-decoration: none; color: var(--accent); }
.gallery-head .back:hover { color: var(--off-white); }
.gallery { columns: 3; column-gap: 16px; }
.gallery-item {
  display: block; break-inside: avoid; margin-bottom: 16px;
  background: var(--frame); border-radius: var(--radius); padding: 13px;
}
.gallery-item img { width: 100%; height: auto; }

/* ---------- featured projects ---------- */
.page-featured .site-main { height: 1539px; }
.featured { position: absolute; top: 0; left: var(--gutter); width: var(--content); height: 100%; }
.fp-section { position: absolute; left: 0; width: 100%; }
.fp-one { top: 0; height: 857px; }
.fp-two { top: 857px; height: 682px; }
.fp-title { position: absolute; left: 0; top: 7px; width: 279px; height: 82px; padding: 28px 14px 0; }
.fp-title h4 { font-family: var(--font-logo); font-size: 21px; line-height: 29px; letter-spacing: 0.01em; white-space: nowrap; }
.fp-card {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  background: var(--frame);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--white);
}
.fp-img { position: absolute; left: var(--ix); top: var(--iy); width: var(--iw); height: var(--ih); overflow: hidden; }
.fp-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.fp-card:hover .fp-img img { transform: scale(1.03); }
.fp-card h4 {
  position: absolute; left: 0; right: 0; top: var(--cy);
  text-align: center; font-family: var(--font-nav); font-size: 16px; line-height: 22px; color: var(--white);
}
.f1  { --x: 0px;   --y: 104px; --w: 279px; --h: 448px; --ix: 16px; --iy: 18px; --iw: 245px; --ih: 390px; --cy: 413px; }
.f2  { --x: 293px; --y: 7px;   --w: 402px; --h: 272px; --ix: 13px; --iy: 20px; --iw: 373px; --ih: 205px; --cy: 237px; }
.f3  { --x: 293px; --y: 293px; --w: 402px; --h: 264px; --ix: 23px; --iy: 19px; --iw: 361px; --ih: 205px; --cy: 233px; }
.f4  { --x: 705px; --y: 7px;   --w: 254px; --h: 328px; --ix: 14px; --iy: 12px; --iw: 226px; --ih: 276px; --cy: 292px; }
.f5  { --x: 976px; --y: 7px;   --w: 245px; --h: 328px; --ix: 15px; --iy: 15px; --iw: 213px; --ih: 272px; --cy: 290px; }
.f6  { --x: 712px; --y: 348px; --w: 510px; --h: 205px; --ix: 13px; --iy: 13px; --iw: 482px; --ih: 152px; --cy: 174px; }
.f7  { --x: 2px;   --y: 571px; --w: 383px; --h: 272px; --ix: 22px; --iy: 19px; --iw: 341px; --ih: 213px; --cy: 239px; }
.f8  { --x: 402px; --y: 571px; --w: 437px; --h: 272px; --ix: 17px; --iy: 19px; --iw: 402px; --ih: 213px; --cy: 239px; }
.f9  { --x: 859px; --y: 571px; --w: 361px; --h: 272px; --ix: 22px; --iy: 19px; --iw: 316px; --ih: 213px; --cy: 239px; }
.f10 { --x: 2px;   --y: 10px;  --w: 402px; --h: 331px; --ix: 20px; --iy: 10px; --iw: 358px; --ih: 272px; --cy: 294px; }
.f11 { --x: 417px; --y: 10px;  --w: 285px; --h: 318px; --ix: 20px; --iy: 13px; --iw: 245px; --ih: 272px; --cy: 293px; }
.f12 { --x: 730px; --y: 10px;  --w: 239px; --h: 324px; --ix: 19px; --iy: 19px; --iw: 203px; --ih: 272px; --cy: 299px; }
.f13 { --x: 983px; --y: 10px;  --w: 239px; --h: 331px; --ix: 13px; --iy: 14px; --iw: 212px; --ih: 272px; --cy: 297px; }
.f14 { --x: 2px;   --y: 368px; --w: 383px; --h: 252px; --ix: 20px; --iy: 6px;  --iw: 358px; --ih: 213px; --cy: 224px; }
.f15 { --x: 417px; --y: 353px; --w: 378px; --h: 272px; --ix: 21px; --iy: 18px; --iw: 336px; --ih: 213px; --cy: 238px; }
.f16 { --x: 813px; --y: 353px; --w: 402px; --h: 272px; --ix: 21px; --iy: 19px; --iw: 358px; --ih: 213px; --cy: 239px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(23, 23, 23, 0.96);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--off-white); cursor: pointer;
  font: 300 44px/1 var(--font-nav); padding: 12px 18px; opacity: 0.8;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }

/* =========================================================
   Narrower screens: the content column fills the width.
   ========================================================= */
@media (max-width: 1257px) {
  :root { --gutter: 16px; }
  .site-header::before { left: 0; width: 100%; border-radius: 0; }
  .logo { left: 21px; }
  .site-nav { right: 39px; }
  .hero { left: 0; width: 100%; top: 14px; height: 810px; }
  .footer-copy { left: auto; right: 16px; }
  .tagline { right: 43px; }
  .site-main { display: flow-root; }

  .page-about .site-main { min-height: calc(100vh - 150px); padding: 24px 0 46px; }
  .about-simple { width: auto; margin: 0 16px; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); }
  .about-portrait { min-height: 560px; }
  .about-info { padding: 44px 36px 38px; }

  /* series: three per row */
  .page-series .site-main.main-grey { height: auto; padding: 0; }
  .series-grid { position: static; width: auto; height: auto; margin: 16px 16px 90px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .series-tile { position: relative; left: auto; top: auto; width: auto; height: 236px; }
  .series-tile:nth-child(n+4) { height: 246px; }
  .series-tile img { left: 12px; top: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .series-tile span { left: 50%; top: 50%; font-size: 14px; white-space: normal; text-align: center; width: 85%; }

  .gallery-page { width: auto; margin: 0 16px; }

  /* featured: three per row */
  .page-featured .site-main { height: auto; padding: 0; }
  .featured, .fp-section { position: static; width: auto; height: auto; }
  .featured { margin: 16px 16px 60px; padding: 0; }
  .fp-section { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .fp-two { margin-top: 14px; }
  .fp-title { position: relative; left: auto; top: auto; width: auto; height: auto; grid-column: 1 / -1; padding: 26px 20px; }
  .fp-card { position: relative; left: auto; top: auto; width: auto; height: auto; padding: 14px 14px 12px; }
  .fp-img { position: relative; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .fp-card h4 { position: static; margin-top: 10px; font-size: 15px; }
}

@media (max-width: 760px) {
  .logo { left: 12px; }
  .logo img { width: 230px; }
  .site-nav { right: 8px; }
  .site-nav a { width: auto; padding: 0 9px; font-size: 12px; letter-spacing: 0.1em; }
  .site-nav a:nth-child(3) { width: auto; }
  .gallery { columns: 2; }
}

/* phones */
@media (max-width: 600px) {
  .logo img { width: 240px; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    position: absolute; top: 32px; right: 12px; width: 44px; height: 44px; z-index: 2;
    background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .menu-toggle span { display: block; height: 2px; background: var(--off-white); border-radius: 1px; transition: transform 0.25s, opacity 0.25s; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    display: none;
    position: absolute; top: 88px; left: 0; right: 0; margin: 0;
    flex-direction: column; background: var(--surface); padding: 8px 0 14px;
    border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius);
  }
  .menu-open .site-nav { display: flex; }
  .site-nav a { width: 100%; height: 46px; font-size: 14px; }

  .about-simple { grid-template-columns: 1fr; }
  .about-portrait { min-height: 0; aspect-ratio: 4 / 3; }
  .about-info { padding: 34px 24px 30px; }
  .about-info h1 { font-size: 31px; }
  .about-bio { margin-top: 26px; }
  .about-bio p { font-size: 15px; }
  .series-tile, .series-tile:nth-child(n+4) { height: auto; aspect-ratio: 4 / 3; }
  .series-grid { margin-bottom: 60px; gap: 14px; }
  .fp-img { aspect-ratio: 4 / 3; }
  .series-grid, .fp-section { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .gallery-head { padding: 22px 20px; }

  .site-footer { height: 81px; padding: 0; }
  .footer-copy { top: 28px; left: 0; right: 0; width: 100%; transform: none; }
  .copyright { width: 100%; text-align: center; }
}
