/* ============================================================
   GAŠPER ŠLAJNAR — PORTFOLIO
   Design system + all page styles
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --bg:            #0A0A0A;
  --bg-soft:       #111111;
  --surface:       #181818;
  --border:        rgba(255, 255, 255, 0.07);
  --text:          #F0EFEB;
  --text-muted:    #666666;
  --text-dim:      #2E2E2E;
  --accent:        #8FABB7;          /* cool steel-blue — neutral, works with any photography */
  --accent-subtle: rgba(143, 171, 183, 0.10);

  /* Fonts */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  /* Type scale — fluid, clamp-based */
  --text-xs:   clamp(0.68rem,  1vw,   0.78rem);
  --text-sm:   clamp(0.85rem,  1.2vw, 0.95rem);
  --text-base: clamp(1rem,     1.4vw, 1.1rem);
  --text-lg:   clamp(1.15rem,  2vw,   1.35rem);
  --text-xl:   clamp(1.5rem,   3vw,   2rem);
  --text-2xl:  clamp(2.2rem,   5vw,   3.5rem);
  --text-hero: clamp(4.5rem,   9vw,   8rem);

  /* Spacing */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  2rem;
  --sp-lg:  4rem;
  --sp-xl:  8rem;
  --sp-2xl: 14rem;

  /* Layout */
  --container: 1380px;
  --gutter:    clamp(1.5rem, 4vw, 4rem);

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout:  cubic-bezier(0.76, 0, 0.24, 1);
  --dur-fast:    0.25s;
  --dur-med:     0.55s;
  --dur-slow:    1s;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none; /* replaced by custom cursor */
}

/* Restore cursor on touch devices (no custom ring there) */
@media (hover: none) {
  body, *, *::before, *::after { cursor: auto !important; }
}

img {
  display: block;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout helpers ── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-label {
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-md);
}


/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;   /* inverts whatever is underneath — the modern cursor trick */
  transform: translate(-50%, -50%);
  transition: width  0.45s var(--ease-out),
              height 0.45s var(--ease-out),
              opacity var(--dur-fast) ease;
}

/* Expands on hoverable elements */
.cursor-ring.is-hovering {
  width: 72px;
  height: 72px;
}

/* Shrinks on click */
.cursor-ring.is-clicking {
  width: 24px;
  height: 24px;
  transition-duration: 0.1s;
}

/* Hide on touch devices */
@media (hover: none) {
  .cursor-ring { display: none; }
}


/* ============================================================
   LANGUAGE SWITCH
   ============================================================ */
.nav__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-divider {
  font-size: var(--text-xs);
  color: var(--text-dim);
  line-height: 1;
  user-select: none;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  cursor: none;
  padding: 0;
  transition: color var(--dur-fast) ease;
}

.lang-btn.is-active { color: var(--text); }
.lang-btn:hover     { color: var(--accent); }


/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */
.page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  transform-origin: bottom;
  transform: scaleY(0);
  pointer-events: none;
}


/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem var(--gutter);
  transition: padding var(--dur-med) var(--ease-out),
              background var(--dur-med) ease;
}

/* Scrolled state — added via JS */
.nav.is-scrolled {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* Hidden state — added via JS on scroll down */
.nav.is-hidden {
  transform: translateY(-100%);
}

.nav {
  transition: padding var(--dur-med) var(--ease-out),
              background var(--dur-med) ease,
              transform var(--dur-med) var(--ease-out);
}

.nav__logo {
  font-family: var(--serif);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--dur-med) var(--ease-out);
}

.nav__link:hover {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

.nav__link.is-active {
  color: var(--text);
}

/* Hamburger toggle — visible only on mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform var(--dur-med) var(--ease-out),
              opacity var(--dur-fast) ease;
}

.nav__toggle.is-open span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.nav__toggle.is-open span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu */
.nav__mobile {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  padding: max(4rem, 12vh) var(--gutter) 3rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) ease;
}

.nav__mobile.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-link {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
}

.nav__mobile-link:hover {
  color: var(--text);
}

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: #0D0D0D; /* visible placeholder before image loads */
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  will-change: transform;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.1)  0%,
    rgba(10,10,10,0.0)  30%,
    rgba(10,10,10,0.45) 65%,
    rgba(10,10,10,0.88) 82%,
    rgba(10,10,10,1.0)  100%   /* full black at bottom — merges with section below */
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter);
  padding-bottom: 8rem; /* clearance so title never overlaps the absolute CTA button */
}

.hero__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  opacity: 0; /* animated in by GSAP */
}

.hero__title {
  font-family: var(--serif);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.01em;
  overflow: hidden;
  padding-bottom: 0.18em; /* room for descenders (p, j, g) */
}

.hero__title-line {
  display: block;
  transform: translateY(110%); /* animated up by GSAP */
}

.hero__title-line--serif {
  font-style: italic;
  color: var(--text-muted);
}

.hero__bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2.5rem var(--gutter);
  opacity: 0; /* animated in by GSAP */
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(240, 239, 235, 0.25);
  padding: 0.9rem 1.8rem;
  border-radius: 100px;
  transition: border-color var(--dur-fast) ease,
              background var(--dur-fast) ease,
              color var(--dur-fast) ease;
}

.hero__cta:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.hero__scroll span {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1);   transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(0.6); transform-origin: top; }
}

@media (max-width: 768px) {
  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero__scroll  { flex-direction: row; }
  .hero__scroll span { writing-mode: horizontal-tb; }
  .hero__scroll-line { width: 40px; height: 1px;
    background: linear-gradient(to right, var(--text-muted), transparent); }
}

/* ── Mobile hero: prevent title from overlapping the CTA button ── */
@media (max-width: 600px) {
  /* Pull hero__bottom out of absolute position into the flex flow */
  .hero {
    justify-content: flex-end;
    gap: 0;
  }
  .hero__content {
    padding-bottom: 2.5rem; /* more breathing room above CTA */
    flex-shrink: 0;
  }
  .hero__title {
    /* Smaller on phones so all three lines fit without overlapping */
    font-size: clamp(2.4rem, 13vw, 3.6rem);
  }
  .hero__bottom {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    padding: 1.5rem var(--gutter) 3rem;
    flex-shrink: 0;
  }
  /* Hide the scroll indicator on small screens — saves vertical space */
  .hero__scroll { display: none; }
}

/* ── Hide lang switch from top nav on mobile — it lives in mobile menu ── */
@media (max-width: 768px) {
  .nav__right .lang-switch { display: none; }
}


/* ============================================================
   FEATURED STRIP (horizontal drag scroll)
   ============================================================ */
.featured {
  padding: var(--sp-2xl) 0 var(--sp-xl);
  display: flex;       /* side-by-side: header column left, track right */
  align-items: stretch;
}

/* Left column — label + big title */
.featured__header {
  flex: 0 0 clamp(190px, 22vw, 290px);
  padding: 0 clamp(1rem, 2vw, 2rem) 3.8rem var(--gutter);
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured__title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  font-weight: 300;
  line-height: 1.0;
  margin: 0.5rem 0 0;
}

.featured__title em {
  font-style: italic;
  color: var(--text-muted);
}

/* Right column — track + drag hint stacked */
.featured__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 800px) {
  .featured { flex-direction: column; }
  .featured__header {
    flex: none;
    padding: 0 var(--gutter) var(--sp-md);
    justify-content: flex-start;
  }
  .featured__right { flex: none; }
  /* Arrows: add gutter on both sides and hide the text label */
  .featured__drag-hint {
    padding-left: var(--gutter);
  }
  .featured__drag-hint span {
    display: none;
  }
}

.featured__track-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  user-select: none;
}

.featured__track-wrapper::-webkit-scrollbar { display: none; }

.featured__track-wrapper.is-dragging { cursor: grabbing; }

.featured__track {
  display: flex;
  gap: 1.2rem;
  padding: 0 var(--gutter);
  width: max-content;
  align-items: flex-end;
}

.featured__item {
  flex: 0 0 auto;
  /* No fixed width — each item is as wide as its natural photo aspect ratio at this height */
  height: clamp(320px, 44vw, 580px);
  overflow: hidden;
  background: var(--surface);
  border-radius: 3px;
}

/* Modifiers kept for HTML compatibility but no longer override size */
.featured__item--tall,
.featured__item--wide { }

.featured__item img {
  height: 100%;
  width: auto;      /* natural width derived from the photo's aspect ratio */
  max-width: none;  /* never shrink below natural size */
  display: block;
  transition: transform 0.8s var(--ease-out);
}

.featured__item:hover img {
  transform: scale(1.04);
}

/* Drag hint — below track inside .featured__right */
.featured__drag-hint {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem var(--gutter) 0 var(--gutter);
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

.featured__drag-hint svg {
  opacity: 0.5;
  flex-shrink: 0;
}

/* Right-edge fade — hints at more content */
.featured__track-outer {
  position: relative;
}

.featured__track-outer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(60px, 8vw, 120px);
  height: 100%;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}


/* ============================================================
   HOME CATEGORIES — 2×2 card grid (reuses port-cat-card styles)
   ============================================================ */
.categories {
  padding: var(--sp-xl) 0 0;
}

.categories > .container {
  margin-bottom: var(--sp-md);
}

.categories__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

/* Home page cards: 4:3 landscape */
.categories__cards .port-cat-card__img {
  aspect-ratio: 4 / 3;
}

@media (max-width: 700px) {
  .categories__cards { grid-template-columns: 1fr; }
  .categories__cards .port-cat-card__img { aspect-ratio: 3 / 2; }
}


/* ============================================================
   ABOUT TEASER
   ============================================================ */
.about-teaser {
  padding: var(--sp-2xl) 0;
}

.about-teaser__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
}

.about-teaser__title {
  font-family: var(--serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: var(--sp-md);
}

.about-teaser__body {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--sp-lg);
  max-width: 42ch;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap var(--dur-med) var(--ease-out);
}

.btn-text:hover {
  gap: 1.2rem;
}

.about-teaser__image {
  aspect-ratio: 3/4;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.about-teaser__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.about-teaser__image:hover img {
  transform: scale(1.04);
}

@media (max-width: 900px) {
  .about-teaser__inner {
    grid-template-columns: 1fr;
  }
  .about-teaser__image {
    aspect-ratio: 4/5;
    order: -1;
  }
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--sp-lg) 0 var(--sp-md);
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: var(--sp-md);
}

.footer__name {
  font-family: var(--serif);
  font-size: var(--text-xl);
  font-weight: 300;
  margin-bottom: 0.25rem;
}

.footer__tagline {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer__right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.footer__social {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
  letter-spacing: 0.04em;
}

.footer__social:hover {
  color: var(--text);
}

.footer__bottom {
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border);
}

.footer__bottom p {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

@media (max-width: 600px) {
  .footer__inner { flex-direction: column; gap: var(--sp-md); }
  .footer__right { align-items: flex-start; }
}


/* ============================================================
   PORTFOLIO PAGE
   ============================================================ */

/* Wrapper that starts just below the nav */
.port-landing {
  padding-top: 5.5rem; /* clears fixed nav */
  display: flex;
  flex-direction: column;
}

/* Thin heading strip — keeps vertical space to a minimum */
.port-landing__head {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding-top: 1.6rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

/* section-label inside the heading strip has no bottom margin */
.port-landing__head .section-label {
  margin-bottom: 0;
  flex-shrink: 0;
}

.port-landing__title {
  font-family: var(--serif);
  font-size: var(--text-lg);  /* intentionally small — the cards are the hero */
  font-weight: 300;
  line-height: 1;
  color: var(--text-muted);
}

.port-landing__title em {
  font-style: italic;
  color: var(--text);
}

/* Keep legacy .page-hero for about / contact pages */
.page-hero {
  padding-top: 6rem;
  padding-bottom: 1rem;
}

.page-hero__title {
  font-family: var(--serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.1;
  max-width: 14ch;
  margin-top: 0.5rem;
}

/* Filter tabs */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-lg);
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  cursor: none;
  transition: border-color var(--dur-fast) ease,
              color var(--dur-fast) ease,
              background var(--dur-fast) ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  border-color: var(--text);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--text);
  color: var(--bg);
}

/* ── Gallery toolbar (filter bar + slideshow toggle) ── */
/* ── Portfolio filter bar ── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* ── Portfolio: category sections ── */
.port-sections {
  padding-bottom: var(--sp-xl);
}

.port-section {
  padding: var(--sp-xl) 0 0;
  border-top: 1px solid var(--border);
  margin-top: 0;
  transition: opacity var(--dur-med) ease;
}

.port-section.is-hidden {
  display: none;
}

.port-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: var(--sp-md);
  flex-wrap: wrap;
}

.port-section__meta {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}

.port-section__name {
  font-family: var(--serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}

.port-section__count {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Slideshow entry button (per section) ── */
.slideshow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  cursor: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) ease,
              color var(--dur-fast) ease;
}

.slideshow-btn:hover {
  border-color: var(--text);
  color: var(--text);
}



/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(10, 10, 10, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__inner {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox__close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-base);
  letter-spacing: 0.08em;
  cursor: none;
  transition: color var(--dur-fast) ease;
  font-family: var(--sans);
  font-weight: 300;
}

.lightbox__close:hover { color: var(--text); }

.lightbox__prev,
.lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: none;
  padding: 1rem;
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }

.lightbox__prev:hover { color: var(--text); transform: translateY(-50%) translateX(-4px); }
.lightbox__next:hover { color: var(--text); transform: translateY(-50%) translateX(4px); }

.lightbox__counter {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--text-muted);
}


/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-page {
  padding-top: 14rem;
}

.about-page__hero {
  padding: 0 var(--gutter) var(--sp-xl);
}

@media (max-width: 900px) {
  .about-page__hero { padding-bottom: var(--sp-sm); }
}

.about-page__name {
  font-family: var(--serif);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.01em;
  overflow: hidden;
  padding-bottom: 0.18em; /* room for descenders (j, p, g) */
}

.about-page__name span {
  display: block;
}

.about-page__body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-xl);
  padding: var(--sp-xl) var(--gutter);
  align-items: start;
}

.about-page__text { position: sticky; top: 8rem; }

.about-page__intro {
  font-family: var(--serif);
  font-size: var(--text-xl);
  font-weight: 300;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: var(--sp-md);
}

.about-page__para {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-sm);
}

.about-page__gear {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border);
}

.about-page__gear h3 {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-sm);
}

.about-page__gear ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-page__gear li {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.about-page__images {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.about-page__img-block {
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.about-page__img-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-page__img-block:first-child { aspect-ratio: 4/5; }
.about-page__img-block:last-child  { aspect-ratio: 16/9; }

@media (max-width: 900px) {
  /* Switch body to flex column so we can order individual image blocks */
  .about-page__body {
    display: flex;
    flex-direction: column;
    padding-top: 0;
  }
  .about-page__text { position: static; order: 1; }

  /* Dissolve the images wrapper so its children participate directly in the
     flex flow of .about-page__body — lets us order them independently */
  .about-page__images { display: contents; }

  /* Portrait photo floats above the text */
  .about-page__img-block--portrait {
    order: 0;
    margin-bottom: var(--sp-sm);
    aspect-ratio: 4/5;
  }

  /* BTS shot stays below everything */
  .about-page__img-block--bts {
    order: 2;
    margin-top: var(--sp-md);
  }
}


/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page {
  padding-top: 14rem;
  padding-bottom: var(--sp-2xl);
}

.contact-page__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: start;
}

.contact-page__title {
  font-family: var(--serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: var(--sp-md);
}

.contact-page__info {
  margin-top: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.contact-page__info-item {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-sm);
}

.contact-page__info-label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.contact-page__info-value {
  font-family: var(--serif);
  font-size: var(--text-lg);
  font-weight: 300;
  transition: color var(--dur-fast) ease;
}

.contact-page__info-value a {
  transition: color var(--dur-fast) ease;
}

.contact-page__info-value a:hover {
  color: var(--accent);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 300;
  padding: 1rem 1.2rem;
  transition: border-color var(--dur-fast) ease;
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  cursor: none;
}

.form-group textarea { min-height: 140px; }

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1.1rem 2.2rem;
  border-radius: 100px;
  cursor: none;
  transition: background var(--dur-fast) ease,
              color var(--dur-fast) ease,
              gap var(--dur-med) var(--ease-out);
  align-self: flex-start;
}

.form-submit:hover {
  background: var(--accent);
  color: var(--bg);
  gap: 1.2rem;
}

@media (max-width: 900px) {
  .contact-page__inner { grid-template-columns: 1fr; }
}


/* ============================================================
   ANIMATION HELPERS (used by GSAP)
   ============================================================ */

/* Clip-path text reveal — set in JS */
.reveal-text {
  overflow: hidden;
}

/* Fade-up elements — GSAP sets from/to */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}

/* Image scale reveal */
.img-reveal {
  overflow: hidden;
}

.img-reveal img {
  transform: scale(1.12);
}

/* Horizontal line grow */
.line-grow {
  transform-origin: left;
  transform: scaleX(0);
}


/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: var(--accent);
  color: var(--bg);
}


/* ============================================================
   PORTFOLIO LANDING — four category cards 2×2 (full-bleed image, text overlay)
   Portrait 3:4 ratio distinguishes them from home's landscape 4:3 cards
   ============================================================ */
.port-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 0;
  margin-bottom: var(--sp-xl);
}

@media (max-width: 480px) {
  .port-cats { grid-template-columns: 1fr; }
}

.port-cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

/* Full-bleed image fills the entire card — 3:2 landscape keeps cards compact in 2-col grid */
.port-cat-card__img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
}

.port-cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1s var(--ease-out);
}

.port-cat-card:hover .port-cat-card__img img {
  transform: scale(1.05);
}

/* Dark gradient over the bottom of the image */
.port-cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 8, 0.92) 0%,
    rgba(8, 8, 8, 0.5)  28%,
    transparent         60%
  );
  transition: opacity var(--dur-med) ease;
  pointer-events: none;
}

/* Text overlaid at the bottom */
.port-cat-card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 2rem 2rem 2.4rem;
}

.port-cat-card__num {
  font-size: var(--text-xs);
  color: rgba(240, 239, 235, 0.4);
  letter-spacing: 0.14em;
  font-family: var(--sans);
  display: block;
  margin-bottom: 0.5rem;
}

.port-cat-card__name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.port-cat-card__desc {
  font-size: var(--text-sm);
  color: rgba(240, 239, 235, 0.55);
  font-weight: 300;
  margin-bottom: 1.4rem;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out),
              transform var(--dur-med) var(--ease-out);
}

.port-cat-card:hover .port-cat-card__desc {
  opacity: 1;
  transform: translateY(0);
}

.port-cat-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap var(--dur-fast) var(--ease-out);
}

.port-cat-card:hover .port-cat-card__cta { gap: 1rem; }


/* ============================================================
   CATEGORY PAGE HEADER — full-bleed cover image + split text (B+D)
   ============================================================ */
.cat-header {
  position: relative;
  height: clamp(420px, 60vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Cover image fills full header area */
.cat-header__cover {
  position: absolute;
  inset: 0;
}

.cat-header__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* Diagonal gradient — lighter top-right, dark bottom-left for legibility */
.cat-header__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10,10,10,0.10) 0%,
    rgba(10,10,10,0.30) 45%,
    rgba(10,10,10,0.90) 100%
  );
}

/* Fade seamlessly into the grid below */
.cat-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
  pointer-events: none;
}

/* Inner: two-column — title left, tagline right */
.cat-header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gutter);
  padding-bottom: 4rem;
  width: 100%;
}

.cat-header__left {
  min-width: 0;
}

.cat-header__top {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 0.5rem;
}

.cat-header .section-label {
  margin-bottom: 0;
  color: rgba(255,255,255,0.50);
}

.cat-header__count {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}

.cat-header__title {
  font-family: var(--serif);
  font-size: clamp(3.8rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

/* Right column — short atmospheric description (Option D) */
.cat-header__tagline {
  flex-shrink: 0;
  max-width: 220px;
  font-size: var(--text-sm);
  line-height: 1.75;
  color: rgba(255,255,255,0.48);
  text-align: right;
  letter-spacing: 0.02em;
  padding-bottom: 0.5rem; /* subtle optical alignment with title baseline */
  margin: 0;
}

@media (max-width: 700px) {
  .cat-header { height: clamp(300px, 72vw, 480px); }
  .cat-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding-bottom: 3rem;
  }
  .cat-header__tagline { text-align: left; max-width: 90%; }
  .cat-header__title { font-size: clamp(2.8rem, 13vw, 4rem); }
}


/* .cat-hero removed — replaced by unified grid with variable row heights */


/* ============================================================
   JUSTIFIED GRID
   ============================================================ */
.cat-grid {
  /* Full-bleed — no container class, touches viewport edges */
  margin-bottom: var(--sp-xl);
}

/* Skeleton loading rows */
.grid-skeleton {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-skeleton__row {
  background: var(--surface);
  animation: shimmer 1.6s ease-in-out infinite;
}

/* Skeleton rows approximate the variable-height first rows */
.grid-skeleton__row--wide   { height: clamp(240px, 60vh, 600px); }
.grid-skeleton__row--medium { height: clamp(180px, 42vh, 440px); }
.grid-skeleton__row--short  { height: 300px; }

@keyframes shimmer {
  0%   { opacity: 0.45; }
  50%  { opacity: 0.9;  }
  100% { opacity: 0.45; }
}

/* ── Desktop: justified rows ── */
.grid-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-row {
  display: flex;
  gap: 6px;
}

.grid-photo {
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}

.grid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s var(--ease-out);
}

.grid-photo:hover img { transform: scale(1.03); }

/* ── Mobile: single column, natural aspect ratios, no cropping ── */
.grid-rows--mobile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 var(--gutter);
}

.grid-photo--mobile {
  width: 100% !important;
  height: auto !important;
  flex-shrink: unset;
}

.grid-photo--mobile img {
  width: 100%;
  height: auto;           /* natural height — no cropping */
  object-fit: unset;
  display: block;
  transition: none;       /* no hover effect on touch */
}


/* ============================================================
   CLIP-PATH PHOTO VIEWER
   ============================================================ */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: inset(0 0 0 0);    /* animated by GSAP */
  will-change: clip-path;
}

.photo-viewer__bg {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.96);
}

.photo-viewer__inner {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.photo-viewer__img {
  display: block;
  max-width: 90vw;   /* explicit vw — avoids shrink bug when cycling portrait→landscape */
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-viewer__caption {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  font-family: var(--serif);
  min-height: 1.4em;
}

.photo-viewer__counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  z-index: 2;
}

.photo-viewer__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 2;
  opacity: 0.7;
  transition: opacity var(--dur-fast) ease;
}
.photo-viewer__close:hover { opacity: 1; }

.photo-viewer__prev,
.photo-viewer__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 1rem;
  z-index: 2;
  opacity: 0.5;
  transition: opacity var(--dur-fast) ease;
}
.photo-viewer__prev:hover,
.photo-viewer__next:hover { opacity: 1; }

.photo-viewer__prev { left: 1.5rem; }
.photo-viewer__next { right: 1.5rem; }

@media (max-width: 600px) {
  .photo-viewer__prev { left: 0.5rem; }
  .photo-viewer__next { right: 0.5rem; }
  .photo-viewer__inner { max-width: 96vw; }
  .photo-viewer__img   { max-height: 75vh; }
}


/* ============================================================
   NAV — active link state (category pages)
   ============================================================ */
.nav__link--active {
  color: var(--text);
  opacity: 1;
}
.nav__link--active::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--accent);
  margin-top: 2px;
  width: 100%;
}
