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

:root{
  --photo-max: 900px;   /* controls BOTH max-width and max-height */

  --gap: clamp(1.25rem, 4vw, 2.75rem);
  --pad: var(--gap);

  --page-max: calc(var(--photo-max) + (2 * var(--pad)));

  --text-max: 720px;
  --pad: 1.5rem;
  --muted: #666;
  --text: #111;
  --line: #e9e9e9;
  --bg: #fff;


  /* =========================================================
     FONT PALETTE
     ========================================================= */
  --ff-space-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --ff-vt323: "VT323", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --ff-reenie-beanie: "Reenie Beanie", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-ovo: "Ovo", "Times New Roman", Times, serif;

  --font-heading: var(--ff-ovo);
  --font-nav:     var(--ff-space-mono);
  --font-body:    var(--ff-ovo);
  --font-meta:    var(--ff-space-mono);
  --font-footer:  var(--ff-vt323);
}

body{
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.2;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 4px; }

/* Sticky header wrapper */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); /* now spans full page */
}

.site-header__inner{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.25rem var(--pad) 1rem;

  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Line 1 */
.site-title{
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: none;
  white-space: nowrap;
}

/* Line 2 */
.site-nav{
  font-family: var(--font-nav);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0;
}

.site-nav a{
  font-size: 0.85rem;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.site-nav a[aria-current="page"]{
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* NEW: both sides are flex groups */
.nav-left,
.nav-right{
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.sep{ color: var(--muted); }

/* Page container */
.page{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 3rem;
}

/* Gallery */
.work{ margin-top: 0.5rem; }

.photo-block{ margin: 0 auto var(--gap); }

/* The important part: responsive + square cap */
.photo-block img{
  width: 100%;
  max-width: 100%;   /* fill the 900px content area */
  height: auto;
  max-height: var(--photo-max);
}

.photo-block:hover img{ transform: scale(1.01); }

/* Text sections */
.text-section{
  margin: 3rem 0 0;     /* was: 3rem auto 0 */
  max-width: var(--text-max);
}

.text-section h2{
  font-family: var(--font-meta);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.text-section p + p{ margin-top: 0.75rem; }

.text-section a{
  border-bottom: 1px solid #ddd;
}
.text-section a:hover{ border-bottom-color: #000; }

.site-footer{
  font-family: var(--font-footer);
  max-width: var(--page-max);
  text-align: center;
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  font-size: 0.8rem;
  color: #777;
}

/* Mobile tweaks */
@media (max-width: 600px){
  .site-header{ padding-top: 1.1rem; }

  /* stack nav items on mobile */
  .site-nav{
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-left,
  .nav-right{
    gap: 0.6rem;
  }
}
