/* ═══════════════════════════════════════════════════════════
   TOKENS  —  edit here, changes ripple everywhere
═══════════════════════════════════════════════════════════ */
:root {
  /* Colors */
  --bg:          #ffffff;
  --text:        #111111;
  --muted:       #999999;
  --border:      #e2e2e2;

  /* Typography */
  --font:        'Cormorant Garamond', Georgia, serif;
  /* ── swap the font name above after changing the Google Fonts link in index.html ── */

  /* Layout */
  --nav-h:       58px;
  --pad-x:       52px;      /* horizontal padding left/right */
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;

  /* ── OPTIONAL background image:
     background-image: url('bg.jpg');
     background-size: cover;
     background-attachment: fixed;   ── */
}


/* ═══════════════════════════════════════════════════════════
   PAGE SWITCHING
═══════════════════════════════════════════════════════════ */
.page { display: none; flex-direction: column; min-height: 100vh; }
.page.active { display: flex; }


/* ═══════════════════════════════════════════════════════════
   NAV  —  fixed top bar
═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: flex-end;   /* tabs sit on the right, matching mockup */
  background: var(--bg);
  z-index: 200;
}

/* back arrow — only shown on inner pages */
.nav-back {
  position: absolute;
  left: var(--pad-x);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--text); }

.nav-links {
  display: flex;
  gap: 56px;          /* wide spacing between tabs, matching mockup */
}

.nav-links a {
  font-size: 18px;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.nav-active { color: var(--text); }


/* ═══════════════════════════════════════════════════════════
   HOME  —  two-column layout matching mockup exactly
═══════════════════════════════════════════════════════════ */
.home-layout {
  display: flex;
  flex: 1;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* LEFT col: ~55% width, hero image fills it */
.home-left {
  width: 55%;
  padding: 36px 0 36px var(--pad-x);
  display: flex;
  align-items: stretch;
}

.hero-img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  /* placeholder colour shown when no image is found */
  background: #d0d0d0;
  min-height: 500px;
}

/* RIGHT col: ~45% width, hamburger + projects */
.home-right {
  width: 45%;
  padding: 36px var(--pad-x) 36px 36px;
  display: flex;
  align-items: flex-start;
}

/* Line under the nav bar for the home page */
.home-layout::before {
  content: '';
  position: absolute;
  top: var(--nav-h);
  left: var(--pad-x);
  right: var(--pad-x);
  height: 1px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════════════
   HAMBURGER  +  HOVER-REVEAL PROJECT CARDS
═══════════════════════════════════════════════════════════ */
.trigger-zone {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
  /* tall enough to trigger hover reliably */
  padding-top: 8px;
}

/* three lines */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
}
.hamburger span {
  display: block;
  width: 48px;
  height: 4px;
  background: #000000;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

/* cards hidden by default */
.recent-projects {
  display: flex;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* reveal on hover */
.trigger-zone:hover .recent-projects {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* subtle line animation on hover */
.trigger-zone:hover .hamburger span { background: var(--muted); }
.trigger-zone:hover .hamburger span:nth-child(1) { transform: translateX(5px); }
.trigger-zone:hover .hamburger span:nth-child(3) { transform: translateX(-5px); }

/* individual project card */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  width: 120px;        /* matches the tall portrait blocks in mockup */
}
.project-card:hover .card-cover { opacity: 0.75; }

.card-cover {
  width: 100%;
  height: 320px;       /* tall portrait ratio from mockup */
  object-fit: cover;
  background: #888;    /* placeholder — replaced by your image or bg-color */
  transition: opacity 0.2s;
}

.card-title {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.4;
}


/* ═══════════════════════════════════════════════════════════
   LIST PAGES  (journal / archive / research)
   Daito Manabe-style: full-width rows with thumb on left
═══════════════════════════════════════════════════════════ */
.list-page {
  flex: 1;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.entry-list {
  display: flex;
  flex-direction: column;
}

/* each row */
.entry-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}
.entry-row:first-child { border-top: 1px solid var(--border); }
.entry-row:hover { opacity: 0.5; }

/* thumbnail */
.entry-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #ccc;   /* placeholder */
}

/* text block */
.entry-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.entry-date {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.entry-title {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.entry-tags {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.entry-excerpt {
  font-size: 13px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-top: 4px;
}


/* ═══════════════════════════════════════════════════════════
   PROJECT / POST DETAIL PAGE
═══════════════════════════════════════════════════════════ */
.project-detail {
  flex: 1;
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 100px;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  max-width: 2160px;
}

.detail-date   { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 16px; }
.detail-title  { font-size: 36px; font-weight: 300; letter-spacing: 0.01em; margin-bottom: 32px; }
.detail-cover  { width: 40%; aspect-ratio: 16/9; object-fit: cover; background: #ccc; margin-bottom: 40px; object-position: center center; }
.detail-body   { font-size: 20px; line-height: 1.9; color: #333; max-width: 1000px; }
.detail-body p { margin-bottom: 1.4em; }
.detail-body h2 { font-size: 18px; font-weight: 400; margin: 2em 0 0.6em; }

/* Styling for the caption-box used in Painting 2020 (and others if you reuse the class) */
.caption-box {
  max-width: 9000px; /* Change this value to adjust the text width */
  margin: 0 auto;   /* Centers the box. Change to '0' to align left */
  font-size: 16px;  /* Change text size */
  color: var(--muted); /* Change text color */
  text-align: left;  /* Change to 'left' or 'right' */
  padding: 20px 0;
}

/* optional extra images inside detail */
.detail-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}
.detail-images img {
  width: var(--img-width, 100%);
  max-width: var(--img-max-width, 100%);
  object-fit: contain;
}
.detail-images .img-custom-crop {
  display: block;
  margin: 0 auto;
  width: var(--img-width, 100%);
  max-width: var(--img-max-width, 100%);
  object-fit: cover;
  aspect-ratio: var(--img-aspect-ratio, auto);
  object-position: var(--img-object-position, 50% 50%);
}


/* ═══════════════════════════════════════════════════════════
   INFO (i)
═══════════════════════════════════════════════════ */
.info-page {
  flex: 1;
  display: flex;
  gap: 72px;
  align-items: flex-start;
  padding-top: calc(var(--nav-h) + 80px);
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  padding-bottom: 80px;
  max-width: 900px;
}

.info-portrait {
  flex-shrink: 0;
  width: 220px;
}
.info-portrait img {
  width: 100%;
  background: #ddd;
  min-height: 280px;
  object-fit: cover;
}

.info-body { display: flex; flex-direction: column; gap: 18px; }

.info-name {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.info-bio {
  font-size: 14px;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.85;
}
.info-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.info-links a {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.2s;
}
.info-links a:hover { color: var(--text); }


/* ═══════════════════════════════════════════════════════════
   MOBILE  — basic responsive
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --pad-x: 24px; }

  .nav-links { gap: 24px; }

  /* Stack home columns */
  .home-layout { flex-direction: column; }
  .home-left   { width: 100%; padding: 24px 24px 0; }
  .hero-img    { min-height: 260px; }
  .home-right  { width: 100%; padding: 24px; }

  /* Stack entry rows */
  .entry-row { grid-template-columns: 1fr; }

  /* Stack info */
  .info-page { flex-direction: column; gap: 32px; }
  .info-portrait { width: 160px; }
}

/* ═══════════════════════════════════════════════════════════
   BLOCK LAYOUTS FOR PROJECTS
═══════════════════════════════════════════════════════════ */
.block-hero {
  position: relative;
  margin: 30px 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.block-hero img {
  width: 100%; height: 400px;
}
.block-hero-caption {
  position: absolute;
  bottom: -40px; /* Adjust to move up/down */
  right: 0;      /* Adjust to move left/right */
  width: 25%;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.block-row {
  display: flex;
  justify-content: flex-start;
  gap: 10px; /* Adjust this value to change the horizontal gap */
  width: 100%;
  margin: 30px 0;
  overflow-x: auto; /* Enable horizontal scrolling */
  white-space: nowrap; /* Prevent images from wrapping to the next line */
  padding-bottom: 10px; /* Add some padding for the scrollbar */
}
.block-row img {
  width: 200px; /* Fixed width for each image in the strip */
  height: 150px; /* Fixed height to maintain aspect ratio or a consistent look */
  object-fit: cover;
  flex-shrink: 0; /* Prevent images from shrinking */
}

.block-image-text {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 30px 0;
}
.block-image-text-caption {
  position: absolute;
  bottom: -5px; /* Adjust to move up/down */
  right: -50px;      /* Adjust to move left/right */
  width: 50%;
  font-size: 18px;
  color: var(--muted);
  line-height: normal;
}

.block-scattered {
  margin: 30px 0;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM BLOCK LAYOUTS (Augmented Garden)
═══════════════════════════════════════════════════════════ */
.block-img-full {
  width: 100%;
}
.img-hero-padded {
  margin-right: 600px;
  object-fit: cover;
  background-color: black;
  padding: 00px;
  height: 415px;
}
.row-half-width {
  width: 50%;
  height: 50%;
}
img.img-framed-small {
  width: 50%;
  margin-right: 300px;
  object-fit: contain;
  background-color: black;
  padding: 0px;
  height: 300px;
  box-sizing: content-box;
}
.img-scattered-right {
  margin-left: 600px;
  object-fit: cover;
  background-color: black;
  padding-left: 0px;
  width: 50%;
  height: 40%;
  box-sizing: content-box;
}
.row-width-70 {
  width: 70%;
  height: 70%;
}
.row-width-70-right {
  width: 70%;
  height: 70%;
  margin-left: 600px;
}

/* Generic class for custom cropped images using CSS variables */
.img-custom-crop {
  display: block;
  margin: 0 auto;
  width: var(--img-width, 100%);
  max-width: var(--img-max-width, 100%);
  object-fit: cover;
  aspect-ratio: var(--img-aspect-ratio, auto); /* Default to auto if not set */
  object-position: var(--img-object-position, 50% 50%); /* Default to center if not set */
}


/* ═══════════════════════════════════════════════════════════
   ARCHIVE FILTERS
═══════════════════════════════════════════════════════════ */
.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.filter-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  text-transform: uppercase;
}
.filter-btn:hover,
.filter-btn.active {
  color: var(--text);
  border-bottom: 1px solid var(--text);
}

.scatter-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 110px; /* Similar and wide gaps */
  margin: 80px 0;
  align-items: center;
}

.scatter-item {
  display: flex;
  justify-content: center;
}

/* Stagger the columns to create a scattered look */
.scatter-item:nth-child(3n+1) {
  transform: translateY(30px);
}
.scatter-item:nth-child(3n+2) {
  transform: translateY(-40px);
}
.scatter-item:nth-child(3n) {
  transform: translateY(50px);
}

.scatter-img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.4s ease, opacity 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Minimalist gallery feel */
}

.scatter-img:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

@media (max-width: 768px) {
  .scatter-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    margin: 60px 0;
  }
  .scatter-item:nth-child(3n+1),
  .scatter-item:nth-child(3n+2),
  .scatter-item:nth-child(3n) {
    transform: none; /* Reset desktop stagger */
  }
  .scatter-item:nth-child(2n+1) {
    transform: translateY(30px);
  }
}

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-close {
  position: absolute;
  top: 30px; right: 40px;
  font-size: 40px;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: var(--text);
  cursor: pointer;
  padding: 20px;
  user-select: none;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
