:root {
  --personal-blue: #172d3d;
  --personal-blue-deep: #0c1c27;
  --personal-paper: #eee8dc;
}

body { background: var(--personal-blue); color: #fff; }
main, .personal-hero, .gallery, .places, .personal-footer { min-width: 0; }
.nav { background: #172d3ded; border-color: #ffffff3b; }
.nav a, .nav span { color: #fff; }
.personal-contact { padding: 0; border: 0; background: transparent; color: #fff; font: inherit; cursor: pointer; }

.personal-hero {
  min-height: 350px;
  padding: 58px 6vw 48px;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(360px, 1fr);
  gap: 7vw;
  align-items: center;
  border-bottom: 1px solid #ffffff36;
}
.personal-hero small,
.gallery-kicker,
.places-kicker { font: 10px ui-monospace, monospace; letter-spacing: .08em; color: var(--gold); }
.personal-hero h1 { font: 400 clamp(50px, 6.2vw, 84px)/.9 var(--serif); letter-spacing: -.055em; margin: 16px 0 0; }
.personal-hero p { margin: 0; max-width: 620px; font-size: 14px; line-height: 1.8; color: #c3cdd2; }

.gallery { padding: 62px 0 78px; overflow: hidden; }
.gallery-head { padding: 0 6vw; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.gallery-head h2 { font: 400 clamp(36px, 5vw, 62px) var(--serif); margin: 8px 0 0; }
.gallery-hint { font: 10px ui-monospace, monospace; color: #9babb3; white-space: nowrap; }
.photo-window {
  margin-top: 34px;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.photo-window::-webkit-scrollbar { display: none; }
.photo-window.dragging { cursor: grabbing; }
.photo-track { display: flex; align-items: center; gap: 34px; width: max-content; padding: 22px 9vw 70px; }
.photo-frame {
  width: 350px;
  flex: none;
  margin: 0;
  padding: 13px 13px 19px;
  background: var(--personal-paper);
  color: var(--ink);
  border: 1px solid #928b7e;
  box-shadow: 0 24px 58px #07111d94;
  scroll-snap-align: center;
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease;
}
.photo-frame:nth-child(odd) { transform: rotate(-.7deg); }
.photo-frame:nth-child(even) { transform: rotate(.7deg); }
.photo-frame:hover,
.photo-frame:focus-visible { transform: rotate(0) translateY(-6px); box-shadow: 0 30px 68px #07111db5; outline: none; }
.photo-art { position: relative; overflow: hidden; background: #c8c7c0; aspect-ratio: 2 / 3; }
.photo-art img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.photo-index { position: absolute; top: 11px; left: 11px; padding: 5px 7px; background: #0a151dbd; color: #fff; font: 8px ui-monospace, monospace; letter-spacing: .08em; }
.photo-frame figcaption { min-height: 60px; padding: 14px 3px 0; display: flex; justify-content: space-between; gap: 16px; }
.photo-frame b { font: 500 19px var(--serif); }
.photo-frame small { max-width: 148px; font: 8px/1.6 ui-monospace, monospace; color: #6f6b64; text-align: right; }
.gallery-foot { padding: 0 6vw; color: #98aab3; font-size: 10px; display: flex; justify-content: space-between; gap: 24px; }
.gallery-foot b { color: var(--gold); font-weight: 500; }

.places {
  padding: 62px 6vw;
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(360px, 1fr) 150px;
  gap: 5vw;
  align-items: end;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--ink);
}
.places-kicker { color: var(--red); }
.places h2 { margin: 10px 0 0; font: 400 clamp(38px, 4.2vw, 58px)/1 var(--serif); letter-spacing: -.04em; }
.places p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.places-status { padding-top: 14px; border-top: 1px solid var(--ink); display: flex; flex-direction: column; gap: 9px; }
.places-status span { color: var(--muted); font: 9px ui-monospace, monospace; }
.places-status b { font: 500 18px var(--serif); }

.personal-footer { background: var(--personal-blue-deep); }

.contact-modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 24px; background: #10191de8; }
.contact-modal.show { display: grid; }
.contact-card { width: min(560px, 100%); padding: 30px; background: var(--paper); color: var(--ink); border-top: 7px solid var(--red); box-shadow: 0 30px 90px #0008; }
.contact-card header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 28px; }
.contact-card h2 { margin: 0; font: 400 38px/1 var(--serif); }
.contact-close { width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.contact-list { display: grid; gap: 0; margin: 0; }
.contact-item { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-item dt { color: var(--red); font: 9px ui-monospace, monospace; }
.contact-item dd { min-width: 0; margin: 0; font: 17px var(--serif); overflow-wrap: anywhere; }
.contact-item a { text-underline-offset: 5px; }
body.contact-open { overflow: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 24px; background: #061019f2; }
.lightbox.show { display: grid; }
.lightbox-card { width: min(980px, 92vw); max-height: 91vh; display: grid; grid-template-columns: minmax(0, 1fr) 270px; background: var(--personal-paper); color: var(--ink); overflow: hidden; }
.lightbox-image { min-height: 440px; background: #08131b; display: grid; place-items: center; }
.lightbox-image img { display: block; width: 100%; height: 100%; max-height: 86vh; object-fit: contain; }
.lightbox-caption { padding: 28px 24px; display: flex; flex-direction: column; }
.lightbox-caption .lightbox-number { color: var(--red); font: 9px ui-monospace, monospace; }
.lightbox-caption h3 { margin: 12px 0 28px; font: 500 27px var(--serif); }
.exif-list { margin: 0; display: grid; gap: 0; }
.exif-list div { padding: 10px 0; border-top: 1px solid var(--line); }
.exif-list dt { color: #8a867d; font: 8px ui-monospace, monospace; }
.exif-list dd { margin: 5px 0 0; font-size: 11px; line-height: 1.45; }
.lightbox-controls { margin-top: auto; padding-top: 24px; display: flex; gap: 8px; }
.lightbox-controls button { flex: 1; min-height: 38px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.lightbox-controls button:hover { background: var(--ink); color: var(--paper); }
.close { position: fixed; right: 22px; top: 20px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #ffffff66; background: #07111d88; color: #fff; font-size: 20px; cursor: pointer; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 980px) and (min-width: 761px) {
  .personal-hero {
    min-height: 320px;
    padding: 48px 32px 42px;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
    gap: 38px;
  }
  .personal-hero h1 { font-size: clamp(50px, 7.5vw, 68px); }
  .gallery-head, .gallery-foot { padding-left: 32px; padding-right: 32px; }
  .photo-track { padding-left: 48px; padding-right: 48px; }
  .places {
    padding: 54px 32px;
    grid-template-columns: minmax(175px, .65fr) minmax(0, 1fr);
    gap: 32px;
  }
  .places-status {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
  .personal-footer h2 { font-size: clamp(36px, 6vw, 54px); }
}

@media (max-width: 760px) {
  .personal-hero { min-height: 0; grid-template-columns: 1fr; gap: 26px; padding: 46px 20px 38px; }
  .personal-hero h1 { font-size: clamp(48px, 14vw, 62px); line-height: .92; }
  .personal-hero p { font-size: 14px; }
  .gallery { padding: 46px 0 56px; }
  .gallery-head { display: block; padding: 0 20px; }
  .gallery-hint { display: block; margin-top: 14px; white-space: normal; }
  .photo-track { gap: 24px; padding: 18px 30px 54px; }
  .photo-frame { width: min(78vw, 300px); padding: 10px 10px 16px; }
  .gallery-foot { display: block; padding: 0 20px; }
  .gallery-foot span { display: block; margin-top: 8px; line-height: 1.6; }
  .places { grid-template-columns: 1fr; gap: 26px; padding: 52px 20px; }
  .places p { font-size: 13px; }
  .places-status { flex-direction: row; justify-content: space-between; align-items: baseline; }
  .contact-modal { padding: 16px; }
  .contact-card { padding: 24px 20px; }
  .contact-card h2 { font-size: 32px; }
  .contact-item { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
  .contact-item dd { font-size: 15px; }
  .lightbox { padding: 14px; }
  .lightbox-card { width: 100%; max-height: 92vh; grid-template-columns: 1fr; overflow-y: auto; }
  .lightbox-image { min-height: 0; height: 62vh; }
  .lightbox-image img { max-height: 62vh; }
  .lightbox-caption { padding: 20px; }
  .lightbox-caption h3 { margin-bottom: 18px; }
  .lightbox-controls { margin-top: 18px; }
  .close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-frame { transition: none; }
}
