/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #050c07;
  --surface: #0a120b;
  --border:  #182119;
  --accent:  #c8a96e;
  --text:    #f0ece3;
  --muted:   #697a6b;
  --gap:     10px;

  --h1-fs: clamp(5rem, 14vw, 11rem);
  --visual-ratio: 0.72; 
  --header-height: calc(var(--h1-fs) * var(--visual-ratio));
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

/* ── Header Redesign ── */
header {
  display: flex;
  align-items: center;
  padding: 28px 48px;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

header h1 {
  font-family: 'Ostrich Sans', sans-serif;
  font-weight: 300;
  font-size: var(--h1-fs);
  line-height: var(--visual-ratio); 
  color: var(--text);
  text-transform: uppercase;
  margin: 0;
  display: flex;
  align-items: center;
  height: var(--header-height);
  overflow: visible;
}

.header-right {
  height: var(--header-height);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0; 
  box-sizing: border-box;
}

.subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  padding: 0;

  font-size: calc((var(--header-height) - 8px) * 0.25);
  line-height: 0.85;
  
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  letter-spacing: -0.04em;
}

.subtitle span {
  display: block;
}

header h1 {
  transform: translateY(-0.03em); 
}

.subtitle span:last-child {
  color: var(--accent);
}


.copyright {
  margin-top: auto;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.6;
}

.copyright a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.copyright a:hover { color: var(--accent); }

.copyright img {
  height: 14px !important;
  margin-left: 3px;
  vertical-align: text-bottom;
  filter: invert(1) opacity(0.4);
}

/* ── Mobile header ── */
@media (max-width: 800px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    gap: 0px;
  }

  header h1 {
    font-size: clamp(4rem, 30vw, 10rem);
    line-height: 1;
    height: auto;
  }

  .header-right {
    height: auto;
    padding: 0;
  }

  .subtitle {
    flex-direction: row;
    gap: 0.35em;
    font-size: clamp(0.8rem, 4vw, 1.1rem);
    height: auto;
    justify-content: center;
    letter-spacing: 0.05em;
  }

  .subtitle span {
    display: inline;
    white-space: nowrap;
  }

  .subtitle span {
    display: inline;
    white-space: nowrap;
  }
}

/* ── Gallery grid ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
  padding: var(--gap);
  max-width: 1600px;
  margin: 32px auto;
}

.gallery a {
  display: block;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  position: relative;
}

.gallery a::before {
  content: '';
  display: block;
  padding-top: var(--ratio);
}

.gallery a img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.55s ease;
  filter: brightness(0.88) saturate(0.9);
}

.gallery a:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1);
}

.gallery a.portrait { grid-row: span 2; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--accent); }

footer img { filter: invert(1) opacity(0.4); }

.license-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  vertical-align: middle;
}

.license-link img {
  height: 18px !important;
  width: auto;
  filter: invert(1) opacity(0.6);
  margin-top: -2px;
}

/* ── PhotoSwipe overrides ── */
.pswp { --pswp-bg: #030806; }

.pswp-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: #f0ece3;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.14em;
  pointer-events: none;
  z-index: 10;
  text-align: center;
}

.pswp-caption .sci-name {
  font-style: italic;
  color: #c8b99a;
}

.pswp__button--download-button {
  display: flex;
  align-items: center;
  justify-content: center;
}
