/* ==========================================================================
   Arthur Valente — Architectural Visualization Studio
   Shared design system
   ========================================================================== */

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

:root {
  /* Palette */
  --bg: #f4f3f0;
  --bg-soft: #ecebe6;
  --ink: #1a1a1a;
  --ink-soft: #2a2a2a;
  --muted: #8a8780;
  --muted-soft: #b8b5ad;
  --line: #dedbd2;
  --line-soft: #e8e6df;

  /* Typography */
  --font: 'Manrope', 'Inter', 'Helvetica Neue', sans-serif;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Durations */
  --t-fast: 220ms;
  --t-mid: 400ms;
  --t-slow: 700ms;
  --t-page: 340ms;

  /* Layout */
  --pad-x-desktop: clamp(40px, 6vw, 120px);
  --pad-x-mobile: 22px;
  --grid-gap: clamp(16px, 2vw, 28px);
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS long-press save */
  pointer-events: none; /* clicks pass to parent .media for lightbox/nav */
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; cursor: pointer; color: inherit; }

::selection { background: var(--ink); color: var(--bg); }

/* ──────────────────────────────────────────────────────────────────────────
   PAGE TRANSITIONS
   ────────────────────────────────────────────────────────────────────────── */
.page-veil {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-page) var(--ease-in-out-quart);
}
.page-veil.in { opacity: 1; pointer-events: auto; }

body {
  opacity: 0;
  transition: opacity var(--t-page) var(--ease-out-expo);
}
body.loaded { opacity: 1; }

/* ──────────────────────────────────────────────────────────────────────────
   NAVIGATION
   ────────────────────────────────────────────────────────────────────────── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center;
  padding: 22px var(--pad-x-desktop);
  background: rgba(244, 243, 240, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease-out-cubic),
              padding var(--t-mid) var(--ease-out-cubic),
              background-color var(--t-mid) var(--ease-out-cubic);
}
nav.site-nav.scrolled {
  border-bottom-color: var(--line);
  padding-top: 14px; padding-bottom: 14px;
  background: rgba(244, 243, 240, 0.92);
}

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  position: relative;
  display: inline-block;
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 0;
  transition: color var(--t-fast) var(--ease-out-cubic);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-mid) var(--ease-in-out-cubic);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left center; }
.nav-links a.active { color: var(--muted); }
.nav-links a.active::after {
  transform: scaleX(0.22);
  transform-origin: left center;
  background: var(--muted);
}

.nav-logo {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink);
  transition: opacity var(--t-fast) var(--ease-out-cubic);
}
.nav-logo:hover { opacity: 0.55; }

/* ──────────────────────────────────────────────────────────────────────────
   CUSTOM CURSOR
   ────────────────────────────────────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9998;
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring { opacity: 1; }

.cursor-dot {
  width: 5px; height: 5px;
  background: #ffffff;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.3s ease, transform 0.18s var(--ease-out-cubic),
              width 0.3s var(--ease-out-cubic), height 0.3s var(--ease-out-cubic);
}

.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid #ffffff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.3s ease,
              width 0.45s var(--ease-out-expo),
              height 0.45s var(--ease-out-expo),
              background-color 0.3s var(--ease-out-cubic),
              border-color 0.3s var(--ease-out-cubic);
}
.cursor-ring .cursor-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: #fff;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out-cubic);
  transform: translateY(0);
}

.cursor-ring.hover-img {
  width: 58px; height: 58px;
  background: rgba(255, 255, 255, 0.06);
}
.cursor-ring.hover-img .cursor-label { opacity: 0.95; font-size: 8px; letter-spacing: 0.18em; }

.cursor-ring.hover-link {
  width: 12px; height: 12px;
  background: #ffffff;
}

.cursor-ring.hover-close {
  width: 48px; height: 48px;
  background: rgba(255, 255, 255, 0.08);
}
.cursor-ring.hover-close .cursor-label { opacity: 0.95; font-size: 8px; letter-spacing: 0.18em; }

body.cursor-ready,
body.cursor-ready * { cursor: none !important; }

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
  body, body * { cursor: auto !important; }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ──────────────────────────────────────────────────────────────────────────
   IMAGES — Lazy fade-in
   ────────────────────────────────────────────────────────────────────────── */
.media {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.media::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bg-soft) 0%, #e3e1da 50%, var(--bg-soft) 100%);
  background-size: 200% 200%;
  animation: shimmer 1.8s linear infinite;
  opacity: 0.6;
  transition: opacity 0.5s var(--ease-out-cubic);
}
.media.loaded::before { opacity: 0; }
@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 200%; }
}

.media picture { display: block; width: 100%; height: 100%; }
.media img,
.media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}
.media.loaded img,
.media.loaded video { opacity: 1; }
.media video {
  pointer-events: none; /* same protection as img */
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────────────────────── */
footer {
  margin-top: 140px;
  padding: 36px var(--pad-x-desktop);
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line);
}
footer span {
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ──────────────────────────────────────────────────────────────────────────
   PORTFOLIO GRID  (index.html)
   ────────────────────────────────────────────────────────────────────────── */
.intro {
  padding: 130px var(--pad-x-desktop) 60px;
  display: flex; flex-direction: column; gap: 14px;
}
.intro .eyebrow {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0; transform: translateY(8px);
  animation: fadeUp 0.9s var(--ease-out-expo) 0.15s forwards;
}
.intro h1 {
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 300; line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 18ch;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 1s var(--ease-out-expo) 0.28s forwards;
}
.intro h1 em {
  font-style: italic; font-weight: 200;
  color: var(--muted);
}

main.work { padding: 140px var(--pad-x-desktop) 120px; }

.columns-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(28px, 3.5vw, 56px);
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: clamp(80px, 9vw, 140px); }
.col-right { padding-top: clamp(60px, 10vw, 160px); }

.project-card {
  display: block;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.project-card.visible { opacity: 1; transform: translateY(0); }

.project-card .card-inner {
  display: block;
  will-change: transform;
}
.project-card .media {
  aspect-ratio: 1 / 1;
}
.project-card[data-aspect="wide"]  .media { aspect-ratio: 16 / 10; }
.project-card[data-aspect="tall"]  .media { aspect-ratio: 4 / 5; }
.project-card[data-aspect="square"] .media { aspect-ratio: 1 / 1; }
.project-card .media img {
  transform: scale(1.001);
}
.project-card:hover .media img {
  transform: scale(1.045);
}

.project-meta {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform var(--t-mid) var(--ease-out-cubic);
}
.project-card:hover .project-meta { transform: translateX(2px); }

.project-sub {
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-title {
  font-size: 15px; font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.35;
  color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────────────────
   ABOUT
   ────────────────────────────────────────────────────────────────────────── */
main.about {
  padding: 180px var(--pad-x-desktop) 100px;
  max-width: 800px;
}

.about-eyebrow {
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 48px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s var(--ease-out-expo) 0.1s forwards;
}

.about-text .lede {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 300; line-height: 1.5;
  letter-spacing: -0.005em;
  margin-bottom: 28px;
  max-width: 56ch;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 1s var(--ease-out-expo) 0.25s forwards;
}
.about-text p {
  font-size: 15px; font-weight: 300;
  line-height: 1.85; letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin-bottom: 18px;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 1s var(--ease-out-expo) forwards;
}
.about-text p:nth-of-type(1) { animation-delay: 0.4s; }
.about-text p:nth-of-type(2) { animation-delay: 0.5s; }
.about-text p:nth-of-type(3) { animation-delay: 0.6s; }

.detail-block {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(12px);
  animation: fadeUp 0.9s var(--ease-out-expo) forwards;
}
.detail-block:last-child { border-bottom: 1px solid var(--line); }
.detail-block:nth-of-type(1) { animation-delay: 0.45s; }
.detail-block:nth-of-type(2) { animation-delay: 0.55s; }
.detail-block:nth-of-type(3) { animation-delay: 0.65s; }
.detail-block:nth-of-type(4) { animation-delay: 0.75s; }

.detail-label {
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.detail-value {
  font-size: 14px; font-weight: 300;
  letter-spacing: 0.01em; line-height: 1.7;
}

/* ──────────────────────────────────────────────────────────────────────────
   CONTACT
   ────────────────────────────────────────────────────────────────────────── */
main.contact {
  min-height: calc(100vh - 200px);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 180px var(--pad-x-desktop) 100px;
  max-width: 1200px;
}

.contact-eyebrow {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s var(--ease-out-expo) 0.1s forwards;
}

.contact-links {
  display: flex; flex-direction: column;
  gap: 14px;
}
.contact-link {
  display: inline-block;
  width: fit-content;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 300;
  letter-spacing: -0.005em;
  color: var(--ink);
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s var(--ease-out-expo) forwards;
  transition: opacity var(--t-fast) var(--ease-out-cubic),
              transform var(--t-mid) var(--ease-out-cubic);
}
.contact-link:nth-of-type(1) { animation-delay: 0.25s; }
.contact-link:nth-of-type(2) { animation-delay: 0.35s; }
.contact-link:hover { opacity: 0.55; transform: translate(4px, 0); }

/* ──────────────────────────────────────────────────────────────────────────
   PROJECT PAGE
   ────────────────────────────────────────────────────────────────────────── */
.project-back {
  position: fixed;
  top: 100px;
  left: var(--pad-x-desktop);
  z-index: 90;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff;
  mix-blend-mode: difference;
  opacity: 0;
  animation: backFadeIn 0.9s var(--ease-out-expo) 0.55s forwards;
  transition: opacity var(--t-fast) var(--ease-out-cubic), gap var(--t-mid) var(--ease-out-cubic);
}
.project-back:hover { opacity: 1; gap: 22px; }
.project-back .back-arrow {
  position: relative;
  display: inline-block;
  width: 22px; height: 1px;
  background: currentColor;
  transition: width var(--t-mid) var(--ease-out-cubic);
}
.project-back .back-arrow::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 7px; height: 7px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.project-back:hover .back-arrow { width: 32px; }

@keyframes backFadeIn { to { opacity: 0.85; } }

.project-hero {
  position: relative;
  width: 100%;
  height: clamp(60vh, 78vh, 88vh);
  margin-top: 84px;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-hero .media { width: 100%; height: 100%; aspect-ratio: auto; }
.project-hero .media img,
.project-hero .media video {
  transform: scale(1.06);
  transition: opacity 0.9s var(--ease-out-expo), transform 4s var(--ease-out-expo);
}
.project-hero .media.loaded img,
.project-hero .media.loaded video { transform: scale(1); }

/* Single-image projects: show the full image at natural ratio, no cropping */
.project-hero.single {
  height: auto;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
.project-hero.single .media,
.project-hero.single .media picture {
  height: auto;
  aspect-ratio: auto;
}
.project-hero.single .media img,
.project-hero.single .media video {
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  transform: none;
  transition: opacity 0.9s var(--ease-out-expo);
}
.project-hero.single .media.loaded img,
.project-hero.single .media.loaded video { transform: none; }
.project-hero.single .media::before { display: none; }

.project-header {
  padding: 80px var(--pad-x-desktop) 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.project-title-block {
  display: flex; flex-direction: column; gap: 14px;
}
.project-eyebrow {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s var(--ease-out-expo) 0.2s forwards;
}
.project-h1 {
  font-size: clamp(30px, 4.2vw, 58px);
  font-weight: 300; line-height: 1.05;
  letter-spacing: -0.015em;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 1s var(--ease-out-expo) 0.32s forwards;
}
.project-client {
  font-size: 14px; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 400;
  margin-top: 4px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s var(--ease-out-expo) 0.42s forwards;
}

.project-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  padding-top: 14px;
}
.info-block {
  opacity: 0; transform: translateY(12px);
  animation: fadeUp 0.9s var(--ease-out-expo) forwards;
}
.info-block:nth-child(1) { animation-delay: 0.48s; }
.info-block:nth-child(2) { animation-delay: 0.56s; }
.info-block:nth-child(3) { animation-delay: 0.64s; }
.info-block:nth-child(4) { animation-delay: 0.72s; }

.info-label {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.info-value { font-size: 14px; font-weight: 400; letter-spacing: 0.005em; line-height: 1.6; }

.project-description {
  padding: 30px var(--pad-x-desktop) 80px;
  max-width: 850px;
}
.project-description p {
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 1s var(--ease-out-expo) 0.7s forwards;
}

.project-gallery {
  padding: 0 var(--pad-x-desktop) 100px;
  display: flex; flex-direction: column;
  gap: clamp(40px, 6vw, 90px);
}
.gallery-figure {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.75s var(--ease-out-expo), transform 0.75s var(--ease-out-expo);
}
.gallery-figure.visible { opacity: 1; transform: translateY(0); }
.gallery-figure .media {
  aspect-ratio: 16 / 10;
  cursor: zoom-in;
}
.gallery-figure.tall .media { aspect-ratio: 3 / 4; max-width: 75%; margin: 0 auto; }
.gallery-figure .media img { transition: opacity 0.7s var(--ease-out-expo), transform 1.4s var(--ease-out-expo); }
.gallery-figure:hover .media img { transform: scale(1.025); }

.gallery-caption {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-footer-nav {
  padding: 80px var(--pad-x-desktop) 40px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line);
}
.project-nav-link {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  transition: color var(--t-fast) var(--ease-out-cubic), gap var(--t-mid) var(--ease-out-cubic);
}
.project-nav-link:hover { color: var(--muted); gap: 22px; }
.project-nav-link.next { text-align: right; }
.project-nav-link .arrow {
  display: inline-block;
  width: 24px; height: 1px; background: currentColor;
  position: relative;
  transition: width var(--t-mid) var(--ease-out-cubic);
}
.project-nav-link:hover .arrow { width: 36px; }

.project-next-title {
  display: block;
  font-size: 18px; font-weight: 300;
  letter-spacing: -0.005em;
  text-transform: none;
  margin-top: 6px;
  color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────────────────
   LIGHTBOX
   ────────────────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(15, 14, 13, 0);
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.5s var(--ease-out-cubic);
}
.lightbox.open {
  background: rgba(15, 14, 13, 0.97);
  pointer-events: auto;
}

.lightbox-inner {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.55s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
}
.lightbox.open .lightbox-inner { opacity: 1; transform: scale(1); }

.lb-image-wrap {
  position: relative;
  max-width: 86vw;
  max-height: 78vh;
  display: flex; align-items: center; justify-content: center;
}
.lb-image-wrap img {
  max-width: 86vw;
  max-height: 78vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out-cubic);
}
.lb-image-wrap img.loaded { opacity: 1; }
.lb-image-wrap.transitioning img { opacity: 0; }

.lb-caption {
  margin-top: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.lb-sub {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: #b8b6ae;
}
.lb-title { font-size: 14px; letter-spacing: 0.06em; color: #f0ede5; font-weight: 400; }
.lb-counter {
  margin-top: 12px;
  font-size: 10px; letter-spacing: 0.32em;
  color: #8a8780;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: none; border: none;
  color: #fff;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease-out-cubic), transform 0.3s var(--ease-out-cubic);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }

.lb-close {
  top: 28px; right: 32px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.lb-close::before, .lb-close::after {
  content: ''; position: absolute;
  width: 22px; height: 1px;
  background: currentColor;
}
.lb-close::before { transform: rotate(45deg); }
.lb-close::after { transform: rotate(-45deg); }
.lb-close:hover { transform: rotate(90deg); opacity: 1; }

.lb-prev, .lb-next {
  top: 50%; transform: translateY(-50%);
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-prev::before, .lb-next::before {
  content: '';
  width: 26px; height: 1px;
  background: currentColor;
  position: relative;
}
.lb-prev::after, .lb-next::after {
  content: '';
  width: 10px; height: 10px;
  border-top: 1px solid currentColor;
  position: absolute;
  top: 50%;
}
.lb-prev::after {
  border-left: 1px solid currentColor;
  left: 24px;
  transform: translateY(-50%) rotate(-45deg);
}
.lb-next::after {
  border-right: 1px solid currentColor;
  right: 24px;
  transform: translateY(-50%) rotate(45deg);
}
.lb-prev:hover { transform: translateY(-50%) translateX(-4px); }
.lb-next:hover { transform: translateY(-50%) translateX(4px); }

/* ──────────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ────────────────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ──────────────────────────────────────────────────────────────────────────
   RESPONSIVE  —  MOBILE & TABLET
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  main.about { grid-template-columns: 1fr; }
  .project-header { grid-template-columns: 1fr; gap: 40px; padding-top: 60px; }
}

@media (max-width: 768px) {
  :root { --pad-x-desktop: var(--pad-x-mobile); }

  nav.site-nav {
    padding: 16px var(--pad-x-mobile);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(244, 243, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
  }
  nav.site-nav.scrolled { padding: 14px var(--pad-x-mobile); }

  .nav-logo {
    position: static;
    transform: none;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.04em;
    order: -1;
    flex: 1;
  }
  .nav-links {
    gap: 18px;
    margin-left: auto;
  }
  .nav-links a {
    font-size: 10px;
    letter-spacing: 0.16em;
    padding: 4px 0;
  }

  /* Index */
  main.work { padding: 110px var(--pad-x-mobile) 80px; }
  .columns-wrap {
    grid-template-columns: 1fr;
    gap: 64px;
  }
  .col { gap: 64px; }
  .col-right { padding-top: 0; }

  .project-card .media { aspect-ratio: 4 / 5; }
  .project-meta { margin-top: 14px; gap: 5px; }
  .project-sub { font-size: 9px; letter-spacing: 0.2em; }
  .project-title { font-size: 14px; }

  /* About */
  main.about {
    padding: 130px var(--pad-x-mobile) 60px;
  }
  .about-text .lede { font-size: 17px; line-height: 1.5; }

  /* Contact */
  main.contact { padding: 130px var(--pad-x-mobile) 60px; }
  .contact-link { font-size: 19px; }

  /* Project page */
  .project-back { top: 68px; left: var(--pad-x-mobile); padding: 6px 8px; font-size: 9px; gap: 10px; }
  .project-back .back-arrow { width: 16px; }
  .project-back:hover .back-arrow { width: 22px; }
  .project-hero { height: 56vh; margin-top: 72px; }
  .project-header { padding: 50px var(--pad-x-mobile) 30px; }
  .project-h1 { font-size: 28px; }
  .project-info { grid-template-columns: 1fr; gap: 22px; }
  .project-description { padding: 20px var(--pad-x-mobile) 50px; }
  .project-description p { font-size: 15px; line-height: 1.75; }
  .project-gallery { padding: 0 var(--pad-x-mobile) 60px; gap: 36px; }
  .gallery-figure .media { aspect-ratio: 4 / 5; }
  .gallery-figure.tall .media { max-width: 100%; }
  .project-footer-nav { padding: 50px var(--pad-x-mobile) 30px; gap: 30px; flex-direction: column; align-items: stretch; }
  .project-next-title { font-size: 16px; }

  /* Footer */
  footer { margin-top: 80px; padding: 28px var(--pad-x-mobile); flex-direction: column; gap: 10px; text-align: center; }

  /* Lightbox */
  .lb-close { top: 16px; right: 16px; width: 32px; height: 32px; }
  .lb-close::before, .lb-close::after { width: 18px; }
  .lb-prev, .lb-next {
    width: 44px; height: 44px;
    bottom: 24px; top: auto;
    transform: none;
  }
  .lb-prev { left: 24px; }
  .lb-next { right: 24px; }
  .lb-prev::before, .lb-next::before { width: 20px; }
  .lb-prev::after { left: 19px; width: 8px; height: 8px; }
  .lb-next::after { right: 19px; width: 8px; height: 8px; }
  .lb-prev:hover, .lb-next:hover { transform: none; }
  .lb-image-wrap { max-width: 92vw; max-height: 58vh; }
  .lb-image-wrap img { max-width: 92vw; max-height: 58vh; }
  .lb-caption { padding: 0 24px; }
  .lb-title { font-size: 13px; }
  .lb-counter { margin-top: 8px; }
}
