:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #888;
  --border: #e5e5e5;
  --accent: #0a0a0a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Nav */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  gap: 2rem;
  position: relative;
}
.nav__left, .nav__right { display: flex; flex-direction: column; gap: 0.25rem; }
.nav__right { text-align: right; color: var(--muted); }
.nav__right .nav__role { color: var(--text); font-weight: 500; }
.nav__contact { font-weight: 500; }
.nav__phone { color: var(--muted); }
.nav__brand { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em; justify-self: center; }
.nav__toggle { display: none; }

/* Hero */
.hero {
  padding: 3rem 2rem 4rem;
  border-bottom: 1px solid var(--border);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
.hero__title h1 {
  font-size: clamp(3rem, 11vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero__avatar {
  display: inline-block;
  width: clamp(2.5rem, 9vw, 7rem);
  height: clamp(2.5rem, 9vw, 7rem);
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin: 0 0.25rem;
  flex-shrink: 0;
}
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero__title p {
  max-width: 380px;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.hero__menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.hero__menu a { padding: 0.25rem 0; transition: opacity 0.2s; }
.hero__menu a:hover { opacity: 0.5; }

/* Filters */
.portfolio { padding: 4rem 2rem; }
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}
.filter {
  background: none;
  border: 1px solid var(--border);
  padding: 0.6rem 1.4rem;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 999px;
  color: var(--muted);
}
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Gallery — true masonry, preserves native aspect ratio */
.gallery {
  column-count: 4;
  column-gap: 1rem;
}
.gallery__item {
  margin: 0 0 1rem;
  break-inside: avoid;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--border);
}
.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s;
}
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item.hidden { display: none; }

/* Sections */
.section { padding: 5rem 2rem; max-width: 1400px; margin: 0 auto; border-top: 1px solid var(--border); }
.section__head { margin-bottom: 3rem; }
.section__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); }
.section__head h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0.75rem 0 0;
}

/* About */
.about { max-width: 700px; }
.about p { font-size: 1.1rem; line-height: 1.7; margin: 0 0 1.25rem; color: #333; }

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.service {
  background: var(--bg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.service__num { font-size: 0.75rem; color: var(--muted); font-weight: 600; letter-spacing: 0.1em; }
.service h3 { font-size: 1.4rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.service p { color: var(--muted); font-size: 0.9rem; margin: 0; flex-grow: 1; line-height: 1.6; }
.service__price { font-size: 1.5rem; font-weight: 800; margin-top: 0.5rem; }

/* Contact */
.contact-section { background: var(--text); color: var(--bg); border-top: 0; max-width: 100%; }
.contact-section .section__label { color: rgba(255,255,255,0.5); }
.contact { list-style: none; padding: 0; margin: 0; max-width: 700px; }
.contact li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 1.1rem;
}
.contact span { color: rgba(255,255,255,0.5); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; }
.contact a:hover { opacity: 0.7; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.footer p { margin: 0; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery { column-count: 3; }
}
@media (max-width: 768px) {
  .nav { grid-template-columns: 1fr auto; padding: 1rem 1.25rem; }
  .nav__right { display: none; }
  .nav__brand { justify-self: end; }
  .hero { padding: 2rem 1.25rem 3rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__menu { flex-direction: row; flex-wrap: wrap; text-align: left; gap: 1rem; }
  .portfolio { padding: 2.5rem 1.25rem; }
  .section { padding: 3rem 1.25rem; }
  .gallery { column-count: 2; column-gap: 0.5rem; }
  .gallery__item { margin-bottom: 0.5rem; }
  .contact li { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .footer { padding: 1.5rem 1.25rem; }
}
@media (max-width: 480px) {
  .gallery { column-count: 1; }
}