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

body {
  font-family: Helvetica, Arial, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.4;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  background: white;
  z-index: 100;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 38px;
  height: 30px;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  background: #000;
  height: 2px;
  width: 22px;
  border-radius: 2px;
  position: relative;
}
.hamburger span::before,
.hamburger span::after { content: ''; position: absolute; left: 0; }
.hamburger span::before { top: -7px; }
.hamburger span::after { top: 7px; }

/* mobile nav behavior */
@media (max-width: 900px) {
  .hamburger { display: block; }
  .header { padding: 18px 18px; }
  nav { display: none; position: absolute; top: 100%; left: 0; right:0; background:#fff; padding:12px 18px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  .header.nav-open nav { display: block; }
  nav a { display:block; margin: 8px 0; }
  .nav-item { display:block; margin:0; }
  .nav-item .dropdown { position: static; box-shadow:none; border:none; padding:0; }
  /* nudge logo down slightly on mobile to better align with hamburger/dropdown */
  .logo { transform: translateY(8px); display: inline-block; }

  /* mobile menu mirrors desktop sidebar links */
  .header nav.mobile-side-nav { padding: 14px 18px 18px; }
  .header nav.mobile-side-nav a {
    display: block;
    margin: 0;
    padding: 8px 0;
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
  }
  .header nav.mobile-side-nav a + a { margin-top: 6px; }
  .header nav.mobile-side-nav .side-socials { display: none; }
}

.logo {
  text-decoration: none;
  color: black;
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 13px;
}

nav a {
  margin-left: 30px;
  text-decoration: none;
  color: black;
  font-size: 13px;
  vertical-align: middle;
}

/* Dropdown for nav */
.nav-item { position: relative; display: inline-block; margin-left: 30px; vertical-align: middle; }
.nav-item .nav-link { text-decoration: none; color: #000; font-size:13px; }
.nav-item .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  padding: 8px 0;
  min-width: 160px;
  z-index: 200;
  pointer-events: auto;
}
.nav-item .dropdown a {
  display: block;
  padding: 8px 16px;
  color: #000;
  text-decoration: none;
  font-size: 13px;
}
.nav-item .dropdown a:hover { background: #f5f5f5; }
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown,
.nav-item .dropdown:hover { display: block; }

/* hero nav dropdown positioning */
.hero-nav { margin-top: 18px; }
.hero-nav .nav-item { margin: 0 8px; }
.hero-nav .dropdown { left: 50%; transform: translateX(-50%); top: 100%; }

/* HERO: reduce space so content starts immediately under header */
.hero {
  height: auto;
  min-height: 0;
  display: block;
  padding: 0;
  margin: 0;
}

.side-cats { display: none; }

/* desktop fixed left side navigation (olafpix-like) */
.side-nav { display: none; }
@media (min-width: 1000px) {
  /* wider sidebar so the full name fits on one line */
  .side-nav { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: #fff; border-right: 1px solid #eee; z-index: 120; }
  .side-nav .side-inner { display: flex; flex-direction: column; height: 100%; position: relative; }
  .side-nav .side-logo { display:block; padding: 48px 20px 18px; text-decoration: none; color: #000; font-weight: 700; letter-spacing: 1px; font-size: 18px; white-space: nowrap; }
  .side-nav .side-links { padding: 20px 20px; margin-top: 48px; }
  .side-nav .side-links a { display:block; text-decoration:none; color:#000; padding: 6px 0; font-weight:700; font-size:13px; line-height:1; transition: color .15s ease, opacity .15s ease; }
  .side-nav .side-links > a[href="about.html"] { margin-top: 18px; }
  .side-nav .side-links .side-socials {
    margin-top: 34px;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .side-nav .side-links .side-socials a {
    display: inline-flex;
    padding: 0;
    opacity: .9;
    line-height: 0;
  }
  .side-nav .side-links .side-socials img {
    width: 18px;
    height: 18px;
    display: block;
    opacity: .9;
  }
  .side-nav .side-links .side-socials a:hover img { opacity: 1; }
  .side-nav .side-links a.active,
  .side-nav .side-links a[aria-current="page"] {
    color: #6b6b6b;
    opacity: 0.85;
    font-weight: 400;
  }
  /* social icons removed per user request */
  /* hide top header on desktop (we use side-nav) */
  .header { display: none; }
  /* ensure page content starts to the right of the fixed sidebar */
  body { padding-left: 260px; }
  .content, main, .main-gallery, .gallery, .footer { margin-left: 0; }
  .content { max-width: none; }

  /* side-footer (copyright) positioned at bottom of sidebar */
  .side-footer { position: absolute; left: 24px; right: 24px; bottom: 24px; font-size: 10px; line-height:1.15; opacity: 1; text-align: center; color: #000; }
  .side-footer .line1 { display:block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size:10px; }
  .side-footer .line2 { display:block; margin-top:6px; font-size:10px; }
}

  /* mobile version of desktop footer shown at page bottom */
  .mobile-page-footer { display: none; }
  @media (max-width: 1000px) {
    .mobile-page-footer {
      display: block;
      text-align: center;
      color: #000;
      font-size: 10px;
      line-height: 1.15;
      padding: 26px 18px 20px;
    }
    .mobile-page-footer .line1,
    .mobile-page-footer .line2 {
      display: block;
      font-size: 10px;
    }
    .mobile-page-footer .line1 {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .mobile-page-footer .line2 {
      margin-top: 6px;
    }
  }

/* view toggle button */
.view-toggle {
  display: inline-block;
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 130px; /* moved higher */
  padding: 0;
  font-size: 12px;
  background: transparent;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  cursor: pointer;
}

/* Carousel overlay (keeps sidebar visible) */
.carousel-overlay {
  position: fixed;
  left: 260px;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.carousel-stage { position: relative; width: 100%; height: 100%; display:flex; align-items:center; justify-content:center; }
.carousel-stage img { max-width: 100%; max-height: 92vh; object-fit: contain; }
.carousel-nav {
  position: absolute; top: 0; bottom: 0; width: 50%;
}
.carousel-nav.left { left: 0; cursor: w-resize; }
.carousel-nav.right { right: 0; cursor: e-resize; }
.carousel-counter { position: absolute; top: 24px; right: 48px; color: #fff; font-size: 13px; opacity: .9; }
.carousel-close { position: absolute; top: 8px; left: 48px; color:#fff; font-size:18px; background:transparent; border:0; cursor:pointer; padding:12px; z-index:10001; }
.carousel-close::before { content: ''; display:block; position:absolute; left:0; top:0; right:0; bottom:0; }

/* tiny back-to-top button */
.back-to-top {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 30px;
  height: 30px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 400;
}

.back-to-top.is-visible {
  opacity: 0.9;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  opacity: 1;
}

@media (max-width: 1000px) {
  .carousel-overlay { left: 0; }
  body { padding-left: 0; }
}

/* Desktop-style landing: left category column + right gallery (like olafpix) */
@media (min-width: 900px) {
  .hero {
    display: flex;
    align-items: flex-start;
  }
  .side-cats { width: 220px; padding: 80px 20px 40px 80px; }
  .side-cats a { display: block; text-decoration: none; color: #000; font-weight: 600; letter-spacing: 2px; margin: 18px 0; font-size: 14px; }
  .main-gallery { flex: 1; }
}

.hero h1 {
  font-weight: 300;
  font-size: 28px;
  margin: 0;
}

/* Centered landing styles */
.hero-center { padding-top: 0; height: 75vh; }
.hero-name {
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 48px;
}
.hero-nav { margin-top: 18px; }
.hero-nav a {
  margin: 0 18px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  opacity: 0.9;
}
.hero-nav a:hover { opacity: 1; }

/* GALLERY */
.gallery {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  line-height: 0;
}

/* Packed grid (gallery) for grouping by orientation */
.gallery.grid-pack {
  grid-auto-rows: 8px; /* base row height for span calculations */
  align-items: start;
}

.gallery.grid-pack .item { display: block; }
.gallery-footer { display:none; }

.item {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.item.has-caption::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0,0,0,.006) 0%, rgba(0,0,0,.002) 42%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .18s ease;
}

.item-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  color: #fff;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.4px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}

.item:hover.has-caption::after,
.item:focus-within.has-caption::after {
  opacity: 1;
}

.item:hover .item-caption,
.item:focus-within .item-caption {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .item.has-caption::after,
  .item-caption {
    opacity: 1;
    transform: none;
  }

  .item.has-caption::after {
    background: linear-gradient(to top, rgba(0,0,0,.006) 0%, rgba(0,0,0,.002) 42%, rgba(0,0,0,0) 100%);
  }
}

/* Reset image container padding so images fill their grid cells */
.item, .project { background: transparent; box-sizing: border-box; padding: 0; }
.item img, .project img { display: block; width: 100%; height: auto; }

.item img {
  width: 100%;
  display: block;
  transition: transform .4s ease, opacity .3s ease;
}

.item:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 60px 20px;
  font-size: 12px;
  opacity: .6;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* Desktop / large screens: grid that fills available right-side space */
@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    align-items: start;
  }
  .gallery .item { align-self: stretch; }
  .gallery .item img { width: 100%; height: auto; object-fit: unset; display:block; }
  /* Work page grids: keep separate projects grid behavior but allow bigger thumbnails */
  .projects-grid { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .projects, .projects-grid { padding-left: 0; padding-right: 0; }
}

/* Desktop: show 3-column thumbnail grid to the right of the sidebar (>=1000px) */
@media (min-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    align-items: start;
  }

  .gallery .item img {
    width: 100%;
    height: auto;
    object-fit: unset;
    display: block;
  }

  /* make sure main content is spaced from top and bottom when sidebar is present */
  .content { padding-top: 0; padding-bottom: 0; }
}

/* Mobile: show dropdown on toggle (JS adds .open) */
@media (max-width: 900px) {
  .nav-item .dropdown { position: static; transform: none; box-shadow: none; border: none; padding: 0; display: none; }
  .nav-item.open .dropdown { display: block; }
  .nav-item .dropdown a { padding: 12px 0; border-top: 1px solid #eee; }
}

/* Work page */
.work-cats {
  display: flex;
  gap: 12px;
  padding: 0;
  flex-wrap: wrap;
}
.work-links { display:flex; gap:18px; align-items:center; }
.work-links a { text-decoration:none; color:#000; font-size:14px; }

.category { padding: 0; }
.category h2 { font-size:18px; margin-bottom:0; font-weight:600; }
.projects-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:0; }
.projects-grid img { width:100%; display:block; }
.projects {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.project img { width: 100%; display:block; }

@media (max-width: 900px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .projects { grid-template-columns: 1fr; }
}

/* Ensure work grids show one image per row on small phones */
@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr !important; }
  .projects-grid img, .project img, .item img { width: 100%; height: auto; display:block; }
  /* Remove per-item padding on very small screens so images align flush in the grid */
  .gallery { padding: 0; gap: 0; }
  .gallery .item { padding: 0; }
  .projects, .projects-grid { gap: 0; padding: 0; }
  .projects .project { padding: 0; }
  /* Keep container margins zero */
  .item, .project { margin: 0; }
}

/* Force simple CSS columns masonry when .masonry is active.
   This overrides grid-based gallery rules to avoid JS packing. */
@media (min-width: 900px) {
  .gallery.masonry {
    display: block !important;
    column-count: 3;
    column-gap: 0;
    padding: 0;
    line-height: 0;
  }
  .gallery.masonry .item {
    display: block;
    width: 100%;
    margin: 0;
    break-inside: avoid;
  }
  .gallery.masonry .item img {
    width: 100%;
    height: auto;
    object-fit: unset;
    display: block;
  }
}

/* Landing page: Brahmino-like fixed tiles with horizontal 2x items */
.gallery.landing-grid {
  display: grid !important;
  grid-auto-flow: dense;
  gap: 0;
  line-height: 0;
}

.gallery.landing-grid .item {
  position: relative;
  grid-column: span 1;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.gallery.landing-grid .item img,
.gallery.landing-grid .item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery.landing-grid .item.tile-wide {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
}

@media (min-width: 1000px) {
  .gallery.landing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 999px) and (min-width: 601px) {
  .gallery.landing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    padding-right: 0;
  }

  .gallery.landing-grid .item.tile-wide {
    grid-column: span 2;
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 600px) {
  .gallery.landing-grid {
    grid-template-columns: 1fr;
    padding-left: 0;
    padding-right: 0;
  }

  .gallery.landing-grid .item.tile-wide {
    grid-column: span 1;
    aspect-ratio: 3 / 4;
  }
}

/* ============================================================
   2026 update: nav breakpoint, hero video, text pages, motion
   ============================================================ */

/* mobile header: same links as the sidebar, hamburger up to 999px */
@media (max-width: 999px) {
  .hamburger { display: block; }
  .header { padding: 18px 18px; align-items: center; }
  .header nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 14px 18px 18px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  .header.nav-open nav { display: block; }
  .header nav a { display: block; margin: 0; padding: 8px 0; font-weight: 700; font-size: 13px; line-height: 1; }
  .header nav a + a { margin-top: 6px; }
  .header nav a.active { color: #6b6b6b; font-weight: 400; }
  .logo { transform: none; }
  body { padding-top: 66px; }
}

/* hamburger -> X when open */
.hamburger span, .hamburger span::before, .hamburger span::after { transition: transform .25s ease, background-color .25s ease; }
.header.nav-open .hamburger span { background: transparent; }
.header.nav-open .hamburger span::before { transform: translateY(7px) rotate(45deg); }
.header.nav-open .hamburger span::after { transform: translateY(-7px) rotate(-45deg); }

/* HERO VIDEO (home) */
.hero-video {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #111;
  line-height: 1.2;
}
.hero-video .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 45%);
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  left: 40px;
  bottom: 40px;
  right: 40px;
  color: #fff;
  z-index: 1;
}
.hero-kicker {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 10px;
}
.hero-title {
  font-size: clamp(26px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.05;
}
.hero-scroll {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 1;
  color: #fff;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  animation: hero-bob 2.4s ease-in-out infinite;
}
@keyframes hero-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.hero-overlay > * { animation: hero-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
.hero-overlay > *:nth-child(2) { animation-delay: .15s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (max-width: 999px) {
  .hero-video { height: calc(100svh - 66px); }
  .hero-overlay { left: 18px; right: 18px; bottom: 24px; }
  .hero-scroll { display: none; }
}

/* TEXT PAGES (about, contact) */
.page-text { padding: 140px 40px 80px; }
.text-block { max-width: 640px; }
.text-block h1 { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 40px; }
.text-block p { font-size: 17px; line-height: 1.6; margin-bottom: 18px; }
.text-block .lead { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.25; font-weight: 500; margin-bottom: 32px; }
.text-link, .contact-list a { color: #000; text-decoration: none; border-bottom: 1px solid currentColor; }
.text-link:hover, .contact-list a:hover { opacity: .6; }
.contact-list { list-style: none; font-size: 17px; line-height: 1.6; }
.contact-list li { display: grid; grid-template-columns: 120px 1fr; padding: 14px 0; border-top: 1px solid #eee; }
.contact-list li:last-child { border-bottom: 1px solid #eee; }
.contact-list span { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #6b6b6b; padding-top: 4px; }
@media (max-width: 999px) {
  .page-text { padding: 48px 18px 60px; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* carousel media can be an image or a video */
.carousel-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.carousel-media img, .carousel-media video { max-width: 100%; max-height: 92vh; object-fit: contain; animation: carousel-in .35s ease both; }
.carousel-media video { position: relative; z-index: 2; }
@keyframes carousel-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* scroll reveal (only when JS is active and motion is allowed) */
.js-reveal .gallery .item,
.js-reveal .text-block > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms),
              transform .8s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms);
}
.js-reveal .gallery .item.is-in,
.js-reveal .text-block > *.is-in {
  opacity: 1;
  transform: none;
}

/* hover: slow zoom on tiles, video tiles fill like images */
.gallery .item { cursor: zoom-in; }
.gallery .item img, .gallery .item video { transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .3s ease; }
.gallery .item:hover img, .gallery .item:hover video { transform: scale(1.05); opacity: 1; }
.gallery .item video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* smooth cross-fade between pages (Chrome, Edge, Safari 18+; others just navigate) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

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