:root {
  --bg: #fff;
  --fg: #111;
  --muted: #555;
  --accent: #1e1e1e;
  --grid-gap: 1rem;
  --maxw: 1100px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #eee;
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  position: relative;
  /* desktop layout */
}

.nav a {
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
}

.nav a:hover {
  background: #f4f4f4;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.spacer { flex: 1; }

/* Links row (desktop) */
.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Hamburger button */
.hamburger {
  display: none; /* shown on mobile */
  background: transparent;
  border: 0;
  padding: .4rem;
  margin-left: .25rem;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  /* mobile: hide spacer (no push wrap) */
  .spacer { display: none; }

  /* show hamburger */
  .hamburger { display: inline-block; }

  /* collapse links by default */
  .nav-links {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 20;
  }
  .nav-links a {
    padding: .85rem 1rem;
    border-bottom: 1px solid #eee;
  }
  .nav-links a:last-child { border-bottom: 0; }

  /* open state */
  .nav-links.open { display: flex; }
}


main {
  max-width: var(--maxw);
  margin: 2rem auto;
  padding: 0 1rem 4rem;
}

section {
  margin: 3rem 0;
}

h1, h2 {
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3rem;
}

p {
  line-height: 1.6;
  color: var(--muted);
}

/* Gallery grid */
.grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--grid-gap);
}

figure {
  margin: 0;
  border: 1px solid #eee;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fafafa;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: zoom-in;
}

figure:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.thumb {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #eaeaea;
}

figcaption {
  font-size: 0.9rem;
  padding: 0.6rem 0.7rem 0.8rem;
  color: var(--accent);
}

/* Lightbox modal */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: min(95vw, 1200px);
  max-height: 85vh;
  position: relative;
  display: grid;
  gap: 0.75rem;
  grid-template-rows: auto min-content;
}

.lightbox img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 0.5rem;
  background: #111;
}

.lightbox .caption {
  color: #f0f0f0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.lightbox .close {
  position: absolute;
  top: -1.25rem;
  right: -1.25rem;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 40px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

footer {
  border-top: 1px solid #eee;
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
}


.bio-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.bio h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}


.bio-media {
  width: 100%;
}

.bio-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

/* image styling */
.bio-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* paragraphs remain within <main> width, not full page */
.bio-text {
  max-width: 100%;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
}


@media (max-width: 800px) {
  .bio {
    grid-template-columns: 1fr;
  }
}

/* === Flex layout for bio-top (desktop side-by-side, mobile serial) === */
.bio-top{
  display:flex;            /* switch from CSS grid to flex */
  gap:2rem;
  align-items:flex-start;
}

/* optional: control desktop widths */
.bio-media{ flex:0 0 320px; max-width:100%; }
.bio-intro{ flex:1; }

/* keep image responsive */
.bio-image{ width:100%; height:auto; border-radius:8px; }

/* stack serially on mobile */
@media (max-width: 640px){
  .bio-top{
    flex-direction:column; /* media then intro, one after the other */
  }
  .bio-media, .bio-intro{
    flex:0 0 auto;
  }
}

/* remove the old grid rules for these if they appear earlier */
.bio-top{ grid-template-columns:unset; }
.bio-content{ grid-template-columns:unset; }






