/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --clr-bg: #f5f3f0;
  --clr-surface: #eae7e3;
  --clr-border: #d5d0ca;
  --clr-text: #2a2a2a;
  --clr-text-muted: #7a7a7a;
  --clr-accent: #9a9a9a;
  --clr-accent-light: #6a6a6a;
  --clr-white: #2a2a2a;
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
body.no-scroll { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ========== CUSTOM CURSOR — crosshair (desktop only) ========== */
.crosshair-h, .crosshair-v {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity .4s;
}
.crosshair-h {
  left: 0; width: 100vw; height: 1px;
  background: var(--clr-accent);
  opacity: 0;
}
.crosshair-v {
  top: 0; height: 100vh; width: 1px;
  background: var(--clr-accent);
  opacity: 0;
}
/* Small dot at the intersection */
.crosshair-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--clr-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  opacity: 0;
  transition: opacity .4s;
}
body:hover .crosshair-h,
body:hover .crosshair-v,
body:hover .crosshair-dot { opacity: 1; }

/* Brighten on hover over interactive elements */
.crosshair-h.hover { height: 1.5px; filter: brightness(1.4); }
.crosshair-v.hover { width: 1.5px; filter: brightness(1.4); }
.crosshair-dot.hover { width: 8px; height: 8px; }

@media (pointer: coarse) {
  .crosshair-h, .crosshair-v, .crosshair-dot { display: none; }
}

/* ========== LOADER ========== */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--clr-bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease-out), visibility .6s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-bar {
  width: 120px; height: 2px; background: var(--clr-border); overflow: hidden; border-radius: 1px;
}
.loader-bar span {
  display: block; height: 100%; width: 0; background: var(--clr-accent);
  animation: load 1.2s var(--ease-in-out) forwards;
}
@keyframes load { to { width: 100%; } }

/* ========== NAV ========== */
nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 1.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .4s, backdrop-filter .4s, padding .4s;
}
nav.scrolled {
  background: rgba(245,243,240,.9);
  backdrop-filter: blur(20px);
  padding: 1rem 3rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav-logo-img {
  height: 60px;
  width: auto;
  border-radius: 3px;
}
.nav-logo-text {
  font-size: 1.3rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  line-height: 1.5;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  position: relative;
  transition: color .3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--clr-accent);
  transition: width .3s var(--ease-out);
}
.nav-links a:hover { color: var(--clr-text); }
.nav-links a:hover::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 28px; }
.hamburger span {
  display: block; height: 1.5px; background: var(--clr-text);
  transition: transform .3s, opacity .3s;
}

@media (max-width: 768px) {
  nav { padding: 1.2rem 1.5rem; }
  nav.scrolled { padding: .8rem 1.5rem; }
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0;
    width: 100%; height: 100vh;
    flex-direction: column;
    align-items: center; justify-content: center;
    background: var(--clr-bg);
    gap: 2rem;
    transform: translateX(100%);
    transition: transform .5s var(--ease-out);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
  .hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ========== HERO ========== */
#hero {
  position: relative;
  height: 100vh; height: 100dvh;
  display: flex; align-items: flex-end;
  padding: 4rem 3rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #f5f3f0 0%, #eae7e3 50%, #f0ede9 100%);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(245,243,240,.6) 0%, transparent 50%);
}
/* Architectural grid — now a canvas */
.hero-grid {
  position: absolute; inset: 0; z-index: 1;
}
.hero-grid canvas {
  width: 100%; height: 100%;
  display: block;
}
/* Full-page grid for projects page */
.page-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.page-grid canvas {
  width: 100%; height: 100%;
  display: block;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; margin-bottom: 2rem; }
.hero-tag {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1.5rem;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp .8s var(--ease-out) .8s forwards;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1rem;
  opacity: 0; transform: translateY(40px);
  animation: fadeUp .8s var(--ease-out) 1s forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--clr-accent);
}
.hero-desc {
  max-width: 500px;
  font-size: 1rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp .8s var(--ease-out) 1.2s forwards;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  opacity: 0; transform: translateY(30px);
  animation: fadeUp .8s var(--ease-out) 1.4s forwards;
  transition: gap .3s var(--ease-out);
}
.hero-cta:hover { gap: 1.2rem; }
.hero-cta svg { transition: transform .3s var(--ease-out); }
.hero-cta:hover svg { transform: translateX(4px); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem; right: 3rem;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  opacity: 0;
  animation: fadeUp .8s var(--ease-out) 1.8s forwards;
}
.scroll-indicator span {
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  writing-mode: vertical-lr;
}
.scroll-line {
  width: 1px; height: 60px;
  background: var(--clr-border);
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  display: block;
  width: 100%; height: 30px;
  background: var(--clr-accent);
  animation: scrollDown 2s var(--ease-in-out) infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-30px); }
  100% { transform: translateY(60px); }
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  #hero { padding: 2.5rem 1.5rem; }
  .scroll-indicator { display: none; }
}

/* ========== SWIPE INDICATOR (mobile) ========== */
.swipe-hint {
  display: none;
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  opacity: 0;
  animation: fadeUp .8s var(--ease-out) 1.8s forwards;
}
.swipe-hint span {
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}
.swipe-arrow {
  width: 20px; height: 20px;
  border-right: 1.5px solid var(--clr-accent);
  border-bottom: 1.5px solid var(--clr-accent);
  transform: rotate(45deg);
  animation: swipeBounce 1.8s var(--ease-in-out) infinite;
}
@keyframes swipeBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: .4; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}
.swipe-hint.swiped {
  opacity: 0 !important;
  transition: opacity .3s;
}
@media (pointer: coarse) {
  .swipe-hint { display: flex; }
}

/* ========== SECTION COMMON ========== */
section { padding: 4.5rem 3rem; }
@media (max-width: 768px) { section { padding: 3rem 1.5rem; } }

.section-tag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1rem;
}
.section-title em {
  font-style: italic;
  color: var(--clr-accent);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-desc {
  max-width: 560px;
  color: var(--clr-text-muted);
  line-height: 1.7;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== ABOUT ========== */
#about {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}
.about-image {
  position: relative;
  aspect-ratio: 3/4;
  max-height: 420px;
  overflow: hidden;
}
.about-image .placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #eae7e3, #e0ddd8);
  display: flex; align-items: center; justify-content: center;
}
.placeholder-label {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
  padding: .5rem 1rem;
}
.about-image::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 60%; height: 60%;
  border: 1px solid var(--clr-accent);
  opacity: .3;
  z-index: -1;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}
.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--clr-accent);
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

@media (max-width: 768px) {
  #about { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image { max-height: 400px; }
}

/* ========== SERVICES ========== */
#services { background: var(--clr-surface); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 2.5rem;
}
.service-card {
  padding: 2rem 2rem;
  border: 1px solid var(--clr-border);
  transition: background .4s, border-color .4s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--clr-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.service-card:hover { background: rgba(160,155,148,.06); border-color: rgba(160,155,148,.3); }
.service-card:hover::before { transform: scaleX(1); }
.service-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--clr-border);
  margin-bottom: .75rem;
  transition: color .4s;
}
.service-card:hover .service-number { color: var(--clr-accent); }
.service-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.service-desc {
  font-size: .82rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

@media (max-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }

/* ========== PROJECTS ========== */
.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.project-img {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(145deg, #eae7e3, #e0ddd8);
  display: flex; align-items: center; justify-content: center;
  transition: transform .6s var(--ease-out);
}
.project-card:hover .project-img { transform: scale(1.03); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(245,243,240,.9) 0%, transparent 50%);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  opacity: 0;
  transition: opacity .4s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-type {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: .5rem;
}
.project-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
}
.project-location {
  font-size: .85rem;
  color: var(--clr-text-muted);
  margin-top: .25rem;
}

@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-overlay { opacity: 1; }
}

/* ========== PHILOSOPHY / MARQUEE ========== */
.marquee-section {
  padding: 2rem 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 4rem;
  animation: marquee 25s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  white-space: nowrap;
  color: var(--clr-border);
  transition: color .3s;
}
.marquee-item:hover { color: var(--clr-accent); }
.marquee-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 .5rem;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ========== PROCESS ========== */
#process { background: var(--clr-surface); }
.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 2.5rem;
  position: relative;
}
.process-timeline::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 0; right: 0;
  height: 1px;
  background: var(--clr-border);
}
.process-step {
  padding: 0 2rem;
  position: relative;
}
.step-dot {
  width: 12px; height: 12px;
  border: 2px solid var(--clr-accent);
  border-radius: 50%;
  background: var(--clr-bg);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  transition: background .3s;
}
.process-step:hover .step-dot { background: var(--clr-accent); }
.step-num {
  font-family: var(--font-serif);
  font-size: .85rem;
  color: var(--clr-accent);
  margin-bottom: .75rem;
}
.step-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.step-desc {
  font-size: .85rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .process-timeline { grid-template-columns: 1fr 1fr; gap: 3rem 0; }
  .process-timeline::before { display: none; }
}
@media (max-width: 480px) {
  .process-timeline { grid-template-columns: 1fr; }
}

/* ========== TESTIMONIAL ========== */
#testimonial {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.testimonial-wrap { max-width: 650px; }
.quote-mark {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--clr-accent);
  line-height: 1;
  margin-bottom: .5rem;
}
.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.quote-author { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.quote-role { font-size: .75rem; color: var(--clr-text-muted); margin-top: .25rem; }

/* ========== CONTACT ========== */
#contact {
  background: var(--clr-surface);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { position: relative; }
.form-group label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: .5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .85rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text);
  font-family: var(--font-sans);
  font-size: .95rem;
  outline: none;
  transition: border-color .3s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-accent);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.btn-submit {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: 1rem 2.5rem;
  background: var(--clr-accent);
  color: var(--clr-bg);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background .3s, gap .3s;
}
.btn-submit:hover { background: var(--clr-accent-light); gap: 1.2rem; }
.btn-submit svg { transition: transform .3s; }
.btn-submit:hover svg { transform: translateX(4px); }

.contact-info { display: flex; flex-direction: column; justify-content: center; gap: 1.8rem; }
.info-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: .5rem;
}
.info-value {
  font-size: .95rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
}
.info-value a { transition: color .3s; }
.info-value a:hover { color: var(--clr-text); }
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@media (max-width: 768px) {
  #contact { grid-template-columns: 1fr; }
}

/* ========== FOOTER ========== */
footer {
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--clr-border);
  font-size: .75rem;
  color: var(--clr-text-muted);
}
.footer-social { display: flex; gap: 1.5rem; }
.footer-social a {
  transition: color .3s;
}
.footer-social a:hover { color: var(--clr-accent); }

@media (max-width: 768px) {
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}

/* ========== SMOOTH PARALLAX ========== */
[data-parallax] {
  will-change: transform;
}
.hero-bg, .hero-content {
  will-change: transform;
  transition: transform .1s linear;
}

/* ========== MAGNETIC BUTTONS ========== */
.magnetic {
  display: inline-block;
  transition: transform .3s var(--ease-out);
}

/* ========== SPLIT TEXT ========== */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  margin-right: .12em;
}
.split-word .split-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform .6s var(--ease-out);
}
.split-visible .split-inner {
  transform: translateY(0);
}
/* Stagger each word */
.split-word:nth-child(1) .split-inner { transition-delay: 0s; }
.split-word:nth-child(2) .split-inner { transition-delay: .05s; }
.split-word:nth-child(3) .split-inner { transition-delay: .1s; }
.split-word:nth-child(4) .split-inner { transition-delay: .15s; }
.split-word:nth-child(5) .split-inner { transition-delay: .2s; }
.split-word:nth-child(6) .split-inner { transition-delay: .25s; }
.split-word:nth-child(7) .split-inner { transition-delay: .3s; }
.split-word:nth-child(8) .split-inner { transition-delay: .35s; }
.split-word:nth-child(9) .split-inner { transition-delay: .4s; }
.split-word:nth-child(10) .split-inner { transition-delay: .45s; }

/* ========== 3D TILT CARDS ========== */
.project-card {
  perspective: 800px;
}
.project-card .tilt-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
}
.project-card .shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.project-card:hover .shine {
  opacity: 1;
}

/* ========== PROJECTS PAGE ========== */
.page-header {
  padding-top: 8rem;
  padding-bottom: 2rem;
}
.page-header .section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: .5rem;
}
.page-header .section-desc {
  max-width: 640px;
}

/* Filter buttons */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 3rem;
}
.filter-btn {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  padding: .5rem 1.2rem;
  border: 1px solid var(--clr-border);
  background: transparent;
  cursor: pointer;
  transition: all .3s var(--ease-out);
}
.filter-btn:hover,
.filter-btn.active {
  color: var(--clr-bg);
  background: var(--clr-accent);
  border-color: var(--clr-accent);
}

/* Project detail cards (full-width) */
.project-detail {
  margin-bottom: 6rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.project-detail.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-detail-hero {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 2rem;
}
.project-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.project-detail:hover .project-detail-hero img {
  transform: scale(1.02);
}

.project-detail-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}
.project-detail-info h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
}
.project-meta {
  display: flex;
  gap: 2.5rem;
  flex-shrink: 0;
}
.project-meta-item {
  text-align: right;
}
.project-meta-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: .25rem;
}
.project-meta-value {
  font-size: .85rem;
  color: var(--clr-text-muted);
}

/* Image grid within a project */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.project-gallery .gallery-img {
  overflow: hidden;
  cursor: pointer;
}
.project-gallery .gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3/2;
  transition: transform .5s var(--ease-out);
}
.project-gallery .gallery-img:hover img {
  transform: scale(1.05);
}
/* Span two columns for featured images */
.project-gallery .gallery-img.wide {
  grid-column: span 2;
}
.project-gallery .gallery-img.tall {
  grid-row: span 2;
}
.project-gallery .gallery-img.tall img {
  aspect-ratio: auto;
}

@media (max-width: 768px) {
  .project-detail-info {
    flex-direction: column;
    gap: 1rem;
  }
  .project-meta {
    gap: 1.5rem;
  }
  .project-meta-item {
    text-align: left;
  }
  .project-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .project-gallery .gallery-img.wide {
    grid-column: span 1;
  }
}
@media (max-width: 480px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(40,40,40,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--clr-border);
}
.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 1.5rem;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: color .3s;
  background: none;
  border: none;
}
.lightbox-close:hover {
  color: var(--clr-text);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--clr-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 1rem;
  transition: color .3s;
}
.lightbox-nav:hover { color: var(--clr-text); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }