:root {
  --primary: #a664b5;
  --primary-light: #d8afe1;
  --primary-dark: #754380;
  --bg: #100e11;
  --surface: #18151a;
  --surface-2: #211c23;
  --text: #f8f5f9;
  --muted: #a89fa9;
  --line: rgba(255,255,255,.09);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  background: linear-gradient(to bottom, rgba(16,14,17,.88), rgba(16,14,17,0));
  backdrop-filter: blur(2px);
}
.brand { font-weight: 800; letter-spacing: -.04em; font-size: 1.15rem; display: flex; gap: 9px; align-items: center; }
.brand-mark, .brand-accent { color: var(--primary); }
.header-link { color: var(--muted); font-size: .92rem; transition: color .2s ease; }
.header-link:hover { color: var(--text); }

.hero {
  min-height: 92svh;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 120px 24px 90px;
  background:
    radial-gradient(circle at 50% 10%, rgba(166,100,181,.14), transparent 35%),
    linear-gradient(180deg, #120f13 0%, #100e11 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-content { width: min(1160px, 100%); position: relative; z-index: 2; }
.eyebrow { margin: 0 0 18px; color: var(--primary-light); font-size: .78rem; letter-spacing: .2em; font-weight: 700; }
h1, h2 { margin: 0; }
h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(3.7rem, 9.5vw, 9rem);
  line-height: .9;
  letter-spacing: -.055em;
  font-weight: 600;
}
h1 em { color: var(--primary); font-weight: 600; }
.scroll-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 42px; color: var(--muted); font-size: .95rem; }
.scroll-link span { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--primary-light); }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .16; background: var(--primary); pointer-events: none; }
.hero-glow-one { width: 360px; height: 360px; right: -120px; top: 14%; }
.hero-glow-two { width: 260px; height: 260px; left: -100px; bottom: 8%; opacity: .09; }

.portfolio-section { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 92px 0 110px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
h2 { font-family: "Playfair Display", serif; font-size: clamp(2.7rem, 5vw, 5rem); letter-spacing: -.045em; line-height: .95; }
.work-count { color: var(--muted); font-size: .9rem; padding-bottom: 8px; }

.filters { display: flex; gap: 10px; overflow-x: auto; padding: 3px 2px 24px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: .2s ease;
}
.filter-pill:hover { border-color: rgba(166,100,181,.5); color: var(--text); }
.filter-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.gallery { columns: 3 320px; column-gap: 16px; }
.gallery-card {
  position: relative;
  width: 100%;
  display: inline-block;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  break-inside: avoid;
  opacity: 1;
  transform: scale(1);
  transition: opacity .25s ease, transform .25s ease;
}
.gallery-card.hidden { display: none; }
.gallery-card img { display: block; width: 100%; height: auto; min-height: 180px; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .5s ease; }
.gallery-card:hover img { transform: scale(1.025); filter: brightness(.76); }
.card-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 18px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  opacity: 0;
  transition: opacity .25s ease;
  color: white;
  font-size: .85rem;
}
.card-overlay strong { font-size: 1.3rem; font-weight: 500; }
.gallery-card:hover .card-overlay { opacity: 1; }

.empty-state { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 44px; color: var(--muted); }
.empty-state p { color: var(--text); font-size: 1.2rem; margin-top: 0; }
.empty-state code { color: var(--primary-light); }

footer { border-top: 1px solid var(--line); padding: 26px clamp(20px, 5vw, 72px); color: var(--muted); display: flex; justify-content: space-between; gap: 20px; font-size: .85rem; }
footer a:hover { color: var(--primary-light); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8,7,9,.94);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 88vh; border-radius: 18px; box-shadow: 0 28px 80px rgba(0,0,0,.45); }
.lightbox-close { position: fixed; right: 24px; top: 20px; border: 1px solid var(--line); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.05); color: white; font-size: 1.7rem; cursor: pointer; }

@media (max-width: 760px) {
  .site-header { height: 66px; }
  .hero { min-height: 78svh; padding-top: 100px; }
  h1 { font-size: clamp(3.2rem, 17vw, 5.4rem); }
  .portfolio-section { width: min(100% - 28px, 1320px); padding-top: 68px; }
  .section-heading { align-items: flex-start; }
  .work-count { display: none; }
  .gallery { columns: 2 150px; column-gap: 10px; }
  .gallery-card { margin-bottom: 10px; border-radius: 16px; }
  .gallery-card img { min-height: 100px; }
  .card-overlay { display: none; }
  footer { flex-direction: column; padding-top: 24px; padding-bottom: 34px; }
}

@media (max-width: 420px) {
  .gallery { columns: 2; }
  .filter-pill { padding: 9px 14px; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
