/* ==========================================================
   QUIET / MINIMAL GALLERY STYLE
   Plenty of whitespace, muted neutral palette, restrained
   type. One accent color used sparingly (link/hover only).
   ========================================================== */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #767676;
  --line: #e8e8e6;
  --accent: #6b6b63; /* soft, quiet — used only on hover/focus */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-weight: 400;
  letter-spacing: 0.01em;
}

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

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

/* ---- Images: global safety net ----
   Every image scales to fit its container, keeps its natural
   proportions (never stretched/squashed), and never overflows. */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Header / Nav ---- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 3rem;
}

.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-left: 2rem;
}

.site-name {
  font-size:2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  line-height: 1;
}

.site-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--text);
}

/* ---- Main content (generic — used by work & bio pages) ---- */

main {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0.5rem 3rem 6rem;
}

/* ---- Full-page hero image with overlay links panel (index page only) ---- */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: 320px;
  max-width: 80vw;
  min-height: 100%;
  padding: 7rem 2rem 3rem;
}

.hero-overlay .intro {
  padding: 0 0 2rem;
}

@media (max-width: 700px) {
  .hero-overlay {
    width: 100%;
    max-width: none;
    padding-top: 10rem; 
  }
}

.intro {
  padding: 0 0 3rem;
}

.intro h1 {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

.intro p {
  color: var(--muted);
}

/* ---- Works list (left column) ---- */

.works-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.work-item {
  border-bottom: 1px solid var(--line);
}

/* No divider lines between individual works — nav dividers above are unaffected */
.works-list .work-item {
  border-bottom: none;
}

/* Controls both the Home/Bio-CV nav links and the Work One/Two links below them */
.work-item a {
  display: block;
  padding: 0.2rem 0;
  font-size: 1.05rem;
  color: white;
  transition: opacity 0.2s ease;
font-weight: 600;
}

.work-item a:hover {
  opacity: 0.6;
}

/* Home / Bio-CV links in the sidebar — styled separately from Work One/Two below */
.page-nav .work-item a {
  color: white;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
font-weight: 600;
}



/* ---- Responsive: stack columns on narrow screens ---- */

/* ---- Work page (gallery) ---- */

.work-header {
  padding: 1.25rem 0 1.5rem;
  max-width: 40rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.work-header h1 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.work-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.work-description {
  color: var(--muted);
  width: 100%;
  text-align: justify;
  margin-bottom: 1em;

}

/* Fallback layout before masonry.js runs (and if JS is disabled).
   masonry.js takes over once images are loaded, absolutely positioning
   each item so column heights stay as balanced as possible. */
.gallery {
  column-count: 3;
  column-gap: 1.25rem;
  margin-bottom: 40px; /* Adjust the value as needed */
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 1.25rem;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  background: #f2f2f0;
  cursor: zoom-in;
}

/* Modifier for images with an unusually tall aspect ratio that would
   otherwise dominate a column and throw off masonry balance.
   Crops (via object-fit) rather than letting natural height stand. */
.gallery-item--capped img {
  height: 500px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .gallery {
    column-count: 2;
  }
}

@media (max-width: 550px) {
  .gallery {
    column-count: 1;
  }
}

/* Lightbox (click a gallery image to view it full size) */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 100;
  cursor: zoom-out;
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.gallery-item figcaption {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- Bio page ---- */

.bio, .cv {
  max-width: 40rem;
  padding-top: 2rem;
  margin-bottom: 3rem;
  color: var(--muted);
  text-align: justify;
}

.bio h1 {
  font-size: 1.6rem;
  color: var(--muted);
}

.cv h2 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Focus states (accessibility) ---- */

.gallery-item figcaption {
  display: none;
}

#show-captions:checked ~ .gallery .gallery-item figcaption {
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  background: #f2f2f0;
  cursor: zoom-in;
}

.gallery-item img[data-orientation="landscape"] {
  aspect-ratio: 4 / 3; /* 4:3 aspect ratio for landscape images */
  object-fit: cover;
}

.gallery-item img[data-orientation="portrait"] {
  aspect-ratio: 3 / 4; /* 3:4 aspect ratio for portrait images */
  object-fit: cover;
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.cv {
  max-width: 640px;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.cv-name {
  font-size: 1.1em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.5em;
}

.cv-contact {
  margin: 0 0 3em;
}

.cv-contact a {
  color: inherit;
  text-decoration: none;
}

.cv-contact a:hover {
  color: #999;
}

.cv-heading {
  font-size: 0.85em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin: 3em 0 1em;
}

.cv-heading:first-of-type {
  margin-top: 0;
}

.cv-year {
  font-size: 0.9em;
  font-weight: 400;
  color: #aaa;
  margin: 1.75em 0 0.5em;
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-list li {
  margin: 0 0 0.9em;
}

.cv-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
}

.cv-list a:hover {
  border-bottom-color: #999;
}

.cv-list em {
  font-style: italic;
}