/* INVTD — Minimal black & white theme */
:root {
  --bg: #0b0b0b;
  --fg: #f5f4f2;
  --ink: #111;
  --paper: #f6f5f3;
  --muted: #9a9a9a;
  --accent: #ffffff;
  --radius: 12px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Manrope, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

/* Top nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(6px);
  background: color-mix(in oklab, var(--paper) 80%, transparent);
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid #e8e6e3;
}
.brand .logo { height: 32px; display: none; }
.brand .logo.for-light { display: inline-block; }
@media (prefers-color-scheme: dark) {
  body { background: var(--bg); color: var(--fg); }
  .nav { background: color-mix(in oklab, var(--bg) 70%, transparent); border-color: #222; }
  .brand .logo.for-light { display: none; }
  .brand .logo.for-dark { display: inline-block; height: 36px; }
}

.nav nav a {
  margin-left: 22px; text-decoration: none; color: inherit; opacity: .8;
}
.nav nav a:hover { opacity: 1; }
.nav .cta { border: 1px solid currentColor; padding: 8px 14px; border-radius: 999px; }

.burger { display: none; border: 0; background: transparent; }
.burger span { display: block; width: 22px; height: 2px; margin: 5px 0; background: currentColor; }

/* Hero */
.hero {
  min-height: 84svh; display: grid; place-items: center; text-align: center;
  padding: 64px 20px 48px;
}
.hero h1 {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-weight: 600; font-size: clamp(40px, 7vw, 92px); margin: 0 0 12px;
  letter-spacing: .02em;
}
.hero h1 span { letter-spacing: 0.04em; }
.hero p { max-width: 720px; margin: 0 auto 28px; color: var(--muted); }

.button {
  display: inline-block; padding: 14px 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid currentColor; transition: transform .1s ease, opacity .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: #111; color: #fff; border-color: #111; }
.button.ghost { background: transparent; }

/* Sections */
section { padding: 72px 20px; }
h2 {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-size: clamp(28px, 4.5vw, 48px);
  margin: 0 0 20px;
}
h3 { font-size: 20px; margin: 0 0 10px; }

.grid { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 22px; }
.grid.two { grid-template-columns: 1.2fr .8fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.cards .service, .card {
  background: #fff; border: 1px solid #eee; border-radius: var(--radius); padding: 22px; 
}
@media (prefers-color-scheme: dark) {
  .cards .service, .card { background: #121212; border-color: #1f1f1f; }
}

.bullets { padding-left: 18px; margin: 10px 0 0; }
.bullets li { margin-bottom: 6px; }

/* Portfolio placeholders */
.portfolio .masonry {
  max-width: var(--maxw); margin: 0 auto; display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
}
.portfolio figure.ph {
  aspect-ratio: 1 / 1; background: #e9e7e5; border-radius: 10px;
}
.portfolio figure.tall { grid-row: span 2; aspect-ratio: 2/3; }
.portfolio figure.wide { grid-column: span 2; aspect-ratio: 3/2; }
.portfolio .note { text-align: center; color: var(--muted); margin-top: 14px; }

/* Contact */
.contact .contact-inner {
  max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid #eee; border-radius: 14px; padding: 26px;
}
@media (prefers-color-scheme: dark) {
  .contact .contact-inner { background: #141414; border-color: #1d1d1d; }
}
.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
label { display: block; font-weight: 600; }
input, textarea {
  width: 100%; margin-top: 6px; padding: 12px 12px; border-radius: 10px; border: 1px solid #ddd; background: #fff;
  font: inherit;
}
textarea { resize: vertical; }
.actions { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.footer { padding: 40px 20px 70px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.brandline { font-family: 'Libre Bodoni', Georgia, serif; font-size: 24px; letter-spacing: 0.25em; }
.footer-nav a { margin: 0 10px; color: inherit; opacity: .7; text-decoration: none; }
.copy { margin-top: 8px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .grid.two { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .burger { display: inline-block; }
}

/* Make portfolio images display nicely */
.portfolio img {
  width: 100%;
  height: auto;
  max-height: 350px;  /* adjust this number (px) for image height */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Portfolio section fix */
.portfolio {
  max-width: 1200px;   /* keeps it nicely centered */
  margin: 0 auto;      /* centers the whole section */
  padding: 0 20px;     /* adds some breathing room on sides */
  overflow: hidden;    /* prevents right-side scroll */
}

.portfolio .masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;           /* spacing between photos */
}

.portfolio figure {
  margin: 0;
}

.portfolio img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .portfolio .masonry {
    grid-template-columns: 1fr;  /* 1 image per row */
  }

  .portfolio img {
    object-fit: contain;   /* show full image */
    max-height: 250px;     /* control size so they’re not huge */
  }
}

/* --- Mobile Optimization for Portfolio --- */
@media (max-width: 768px) {
  .portfolio .masonry {
    grid-template-columns: repeat(2, 1fr); /* 2 images per row on mobile */
    gap: 10px;
  }

  .portfolio img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
  }
}

.portfolio .masonry figure {
  display: flex;            /* let figure adapt to content */
  align-items: center;
  justify-content: center;
  background: none;          /* remove gray background */
  box-shadow: none;          /* remove extra shadow */
  padding: 0;                /* no extra spacing */
}

/* Fix image cropping on mobile */
.portfolio img {
  width: 100%;
  height: auto;
  object-fit: contain; /* show whole image, don’t crop */
  border-radius: 10px;
  display: block;
}

/* Fix gray background/extra space in figure blocks */
.portfolio .masonry figure {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  box-shadow: none;
  padding: 0;
}

.masonry {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* spacing between images */
  margin: 0;
  padding: 0;
}

.masonry .ph {
  flex: 1 1 calc(50% - 10px); /* 2 per row */
  box-sizing: border-box;
}

.masonry .ph img {
  width: 100%;
  height: auto;
  display: block;
}

/* For very small screens (phones) */
@media (max-width: 480px) {
  .masonry .ph {
    flex: 1 1 100%; /* 1 per row */
  }
}

