/* ---------- Theme ---------- */
:root {
  --bg: #0b0b0b;
  --bg-soft: #151515;
  --text: #ededed;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --accent: #ffffff;
  --overlay: rgba(10, 10, 10, 0.62);
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: 22px var(--gutter);
  background: linear-gradient(to bottom, rgba(11,11,11,.96), rgba(11,11,11,.85));
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand-tag {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--muted);
}
.nav { display: flex; gap: 28px; margin-right: auto; }
.header-icon { display: flex; color: var(--muted); transition: color .2s; }
.header-icon:hover { color: var(--text); }
.nav a {
  position: relative;
  font-size: .9rem;
  color: var(--muted);
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--text);
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0;
  transition: transform .25s, opacity .25s;
}

@media (max-width: 700px) {
  .nav-toggle { display: block; margin-left: auto; }
  .header-icon { margin-left: auto; }
  .header-icon + .nav-toggle { margin-left: 0; }
  .brand-tag { display: none; }
  .brand-name { font-size: 1.25rem; white-space: nowrap; }
  .nav {
    position: fixed;
    inset: 0;
    top: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: -1;
  }
  .nav a { font-size: 1.5rem; font-family: var(--font-display); }
  .nav a.active::after { display: none; }
  body.nav-open .nav { opacity: 1; pointer-events: auto; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- Home: single row of photos around a signature ---------- */
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 2vw 40px;
}
.home-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8vw;
  width: 100%;
  margin: 0 auto;
}
/* Each side: wide photos stacked on the outside, tall photo next to the logo.
   The script sizes every photo exactly so nothing is cropped. */
.strip-side, .strip-stack { display: flex; gap: inherit; flex: 0 0 auto; }
.strip-side { align-items: center; }
.strip-stack { flex-direction: column; }
.strip-photo {
  flex: 0 0 auto;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
}
.strip-photo.sized { animation: tile-in .9s cubic-bezier(.2,.7,.2,1) forwards; }
.strip-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.9);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}
.strip-photo:hover img { transform: scale(1.05); filter: none; }
.strip-break { display: none; }
.signature {
  flex: 0 0 14vw;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(4px, 1vw, 16px);
  opacity: 0;
  animation: sig-in 1.4s ease .1s forwards;
}
.signature span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
  display: block;
  font-size: clamp(2.2rem, 3.6vw, 5rem); /* shrunk automatically to fit long names */
  line-height: 1.1;
  text-align: center;
  color: var(--text);
  transition: opacity .3s;
}
.signature img { width: 100%; height: auto; }
/* A logo image gets a wider spot so its small text stays readable */
.signature.has-logo { flex-basis: clamp(220px, 19vw, 420px); padding: 0 .6vw; }
.signature.has-logo:hover img { opacity: .8; }
.signature img { transition: opacity .3s; }
.signature:hover span { opacity: .75; }
@keyframes sig-in {
  from { opacity: 0; filter: blur(6px); }
  to { opacity: 1; filter: none; }
}
@media (max-width: 760px) {
  .home { padding: 24px 16px 40px; }
  .home-strip { flex-wrap: wrap; gap: 10px; }
  .strip-side { flex-basis: 100%; justify-content: center; }
  .signature, .signature.has-logo { order: -1; flex-basis: 100%; margin-bottom: 20px; }
  .signature.has-logo img { max-width: 320px; }
}

/* ---------- Galleries: portfolio grid with reveal effect ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 24px var(--gutter) 80px;
}
@media (max-width: 700px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(24px);
  animation: tile-in .9s cubic-bezier(.2,.7,.2,1) forwards;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: grayscale(.35);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s ease;
}
.tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  background: var(--overlay);
  transition: opacity .45s ease;
}
.tile-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 500;
  letter-spacing: .02em;
}
.tile-count {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: rgba(255,255,255,.7);
}
/* The reveal: overlay fades away, photo returns to full colour */
.tile:hover .tile-overlay,
.tile:focus-visible .tile-overlay,
.tile.revealed .tile-overlay { opacity: 0; }
.tile:hover img,
.tile:focus-visible img,
.tile.revealed img { transform: scale(1); filter: none; }
.tile:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

@keyframes tile-in {
  to { opacity: 1; transform: none; }
}

/* ---------- Page headings ---------- */
.page-head {
  padding: 48px var(--gutter) 32px;
  max-width: 900px;
}
.page-head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
}
.page-head p { margin: 0; color: var(--muted); }
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.back-link:hover { color: var(--text); }

/* ---------- Gallery: masonry ---------- */
.masonry {
  columns: 3 320px;
  column-gap: 16px;
  padding: 0 var(--gutter) 80px;
}
.masonry button {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: var(--bg-soft);
  cursor: zoom-in;
  break-inside: avoid;
  overflow: hidden;
  border-radius: var(--radius);
}
.masonry img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity .6s ease, transform .6s ease;
}
.masonry img.loaded { opacity: 1; }
.masonry button:hover img { transform: scale(1.02); }

.gallery-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter) 64px;
  font-size: .85rem;
  color: var(--muted);
}
.gallery-nav a:hover { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,5,.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 120px);
  object-fit: contain;
  user-select: none;
}
.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  padding: 16px;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .8rem;
  letter-spacing: .15em;
  color: var(--muted);
}
@media (max-width: 700px) {
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; }
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding: 48px var(--gutter) 96px;
  max-width: 1200px;
}
.about-photo { display: block; height: auto; width: 100%; background: var(--bg-soft); margin-bottom: 28px; }
.about .about-awards h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--text);
}
.about-side p { font-size: 1.12rem; line-height: 1.7; }
.about h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
}
.about p { color: #cfcfcf; max-width: 60ch; }
.about h2 {
  margin: 40px 0 12px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.about ul { margin: 0; padding: 0; list-style: none; }
.about li { padding: 8px 0; border-bottom: 1px solid var(--line); color: #cfcfcf; }
.award {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}
.award-logo {
  flex: 0 0 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.award-logo:empty { border: 1px dashed var(--line); }
.award-logo:not(:empty) { background: #fff; padding: 6px; }
.award-logo img { width: 100%; height: 100%; object-fit: contain; }
a.award-logo { transition: opacity .2s; }
a.award-logo:hover { opacity: .8; }
.award-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.award-title { color: var(--text); font-size: .95rem; }
.award-org { font-size: .8rem; color: var(--muted); }
.award-year { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.button {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 28px;
  border: 1px solid var(--text);
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.button:hover { background: var(--text); color: var(--bg); }
@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; }
  .about-side { order: -1; }
  .about-photo { max-width: 480px; }
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  padding: 48px var(--gutter) 96px;
  max-width: 1200px;
}
.contact h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
}
.contact-info p { color: #cfcfcf; }
.contact-info a { border-bottom: 1px solid var(--line); }
.contact-info a:hover { border-color: var(--text); }
.contact-photo {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 32px;
  background: var(--bg-soft);
}
.form { display: grid; gap: 22px; align-content: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  border-radius: 0;
  transition: border-color .2s;
}
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--bg-soft); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--text);
}
.form .button { margin-top: 8px; justify-self: start; align-self: start; line-height: 1.6; }
.form-status { min-height: 1.6em; font-size: .9rem; color: var(--muted); }
.form-status.ok { color: #9be39b; }
.form-status.err { color: #f19a9a; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 800px) {
  .contact { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-photo { max-width: 480px; }
}
@media (max-width: 500px) {
  .award-logo { flex-basis: 68px; height: 68px; }
  .award { gap: 16px; }
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}
.site-footer .social { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile { opacity: 1; transform: none; }
}
