:root {
  --paper: #050505;
  --ink: #f7f8fb;
  --blue: #5f87ff;
  --blue-deep: #89a6ff;
  --line: rgba(255,255,255,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); font-family: Inter, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; width: 100%; }
button { color: inherit; font: inherit; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 12px; color: white; background: var(--blue); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-head {
  height: 98px;
  padding: 0 2vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  z-index: 20;
  top: 0;
  overflow: hidden;
  background: rgba(5,5,5,.94);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
}
.site-head::before { content: ""; width: 320px; height: 180px; position: absolute; top: -135px; left: -70px; border-radius: 50%; background: rgba(95,135,255,.22); filter: blur(45px); }
.site-head::after { content: ""; height: 2px; position: absolute; inset: auto 0 0; background: linear-gradient(90deg, var(--blue), rgba(95,135,255,.22) 38%, transparent 72%); }
.site-head > * { position: relative; z-index: 1; }
.identity { display: flex; align-items: center; }
.identity-link { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; transition: opacity .2s ease; }
.identity-link:hover { opacity: .72; }
.camera-mark { width: 23px; height: 23px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.camera-mark-light { fill: currentColor; stroke: none; }
.identity strong { font-size: 23px; font-weight: 600; letter-spacing: -.045em; text-transform: none; }
.site-head nav { min-width: 270px; padding-left: 28px; display: flex; align-items: flex-start; flex-direction: column; gap: 7px; border-left: 1px solid rgba(255,255,255,.18); }
.site-head nav a, .site-head nav span { text-decoration: none; }
.site-head nav span { color: rgba(255,255,255,.48); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
.site-head nav a { padding-bottom: 4px; color: white; border-bottom: 1px solid var(--blue); font-size: 14px; font-weight: 500; letter-spacing: .01em; text-transform: none; transition: color .2s ease, border-color .2s ease; }
.site-head nav a:hover { color: var(--blue-deep); border-color: var(--blue-deep); }

.portfolio { padding: 0 1.7vw 9vw; }
.contact-grid { display: flex; flex-direction: column; gap: 7px; }
.photo-row { width: 100%; min-width: 0; display: flex; gap: 7px; overflow: hidden; }
.photo-card { height: 100%; margin: 0; display: block; flex: 0 0 auto; position: relative; overflow: hidden; background: #151515; transition: opacity .25s ease; }
.photo-card button { width: 100%; height: 100%; padding: 0; display: block; position: relative; overflow: hidden; border: 0; background: none; cursor: zoom-in; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }

@media (hover: hover) and (pointer: fine) {
  .photo-card button:hover img { transform: scale(1.025); }
}

.viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: white; background: #0a0b09; }
.viewer::backdrop { background: #0a0b09; }
.viewer-inner { height: 100%; padding: 58px 6vw 24px; }
.viewer img { width: 100%; height: 100%; object-fit: contain; }
.viewer-close, .viewer-prev, .viewer-next { position: fixed; z-index: 2; border: 0; color: white; background: none; cursor: pointer; }
.viewer-close { top: 18px; right: 22px; font-size: 30px; }
.viewer-prev, .viewer-next { top: 50%; padding: 30px 18px; font-size: 28px; transform: translateY(-50%); }
.viewer-prev { left: 0; }.viewer-next { right: 0; }

@media (max-width: 900px) {
  .site-head { height: auto; min-height: 132px; padding: 16px 18px 18px; display: grid; grid-template-columns: 1fr; align-content: center; gap: 16px; background: #050505; backdrop-filter: none; }
  .site-head nav { width: 100%; min-width: 0; padding: 12px 0 0; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 20px; border-top: 1px solid rgba(255,255,255,.14); border-left: 0; }
  .site-head nav a { justify-self: end; }
  .portfolio { padding: 0 12px 90px; }
}

@media (hover: none), (pointer: coarse) {
  .photo-card img { transition: none; }
}

@media (max-width: 560px) {
  .site-head { min-height: 132px; padding: 15px 14px 18px; }
  .identity strong { font-size: 18px; }
  .site-head nav { display: grid; grid-template-columns: auto 1fr; align-items: center; }
  .site-head nav a { width: fit-content; margin: 0; justify-self: end; font-size: 11px; }
  .site-head nav span { font-size: 7px; }
  .viewer-inner { padding: 50px 12px 20px; }
}

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