:root {
  --bg:      #ffffff;
  --ink:     #222222;
  --soft:    #999999;
  --rule:    #e0e0e0;
  --sans:    'Outfit', system-ui, sans-serif;
  --sidebar: 200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  border-right: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 2.25rem 1.6rem 2rem;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-name {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  margin-bottom: 2.25rem;
  line-height: 1.4;
}

.sidebar-name:hover { opacity: 0.65; }

.sidebar nav ul { list-style: none; }

.sidebar nav ul li button {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--soft);
  background: none;
  border: none;
  padding: 0.28rem 0;
  display: block;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: color 0.15s;
}

.sidebar nav ul li button:hover  { color: var(--ink); }
.sidebar nav ul li button.active { color: var(--ink); font-weight: 400; }

.nav-divider {
  height: 1px;
  background: var(--rule);
  margin: 0.65rem 0;
}

.sidebar-copy {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.65rem;
  color: var(--rule);
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   MAIN
══════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   TEXT PAGES (about / contact)
══════════════════════════════════════════ */
.page { display: none; padding: 3rem 3rem 5rem; }
.page.active { display: block; }

.text-page { max-width: 520px; }

.text-page p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--soft);
  line-height: 1.9;
  margin-bottom: 0.9rem;
}

.detail-row {
  display: flex;
  gap: 1.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8rem;
}

.detail-row:first-of-type { border-top: 1px solid var(--rule); }
.detail-key { font-weight: 300; color: var(--soft); min-width: 90px; }
.detail-val { font-weight: 300; color: var(--ink); }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 1.5rem;
}

.contact-link {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.15s;
}

.contact-link:hover { border-color: var(--ink); }

/* ══════════════════════════════════════════
   GALLERY SECTION WRAPPER
══════════════════════════════════════════ */
.gallery-section {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 43px);
}

.gallery-section.active { display: flex; }

/* View toggle bar */
.view-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 1.75rem;
  border-bottom: 1px solid var(--rule);
  gap: 0.25rem;
}

.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  color: var(--rule);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.view-btn.active { color: var(--ink); }
.view-btn:hover  { color: var(--soft); }
.view-btn svg    { display: block; }

/* ══════════════════════════════════════════
   SINGLE-IMAGE VIEW
══════════════════════════════════════════ */
.single-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.single-view.hidden { display: none; }

.single-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 2.5rem 3.5rem 1.5rem;
}

.single-stage img,
.single-stage .placeholder-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.single-stage .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eeeeee, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  color: var(--soft);
  letter-spacing: 0.06em;
}

/* Caption bar — always visible below image */
.single-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 3.5rem 1.25rem;
  flex-shrink: 0;
}

.single-caption .work-title {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink);
  display: block;
}

.single-caption .work-meta {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--soft);
  margin-top: 0.15rem;
  display: block;
}

.single-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.single-nav button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--soft);
  padding: 0;
  transition: color 0.15s;
}

.single-nav button:hover { color: var(--ink); }

.single-nav .nav-divider-v {
  width: 1px;
  height: 12px;
  background: var(--rule);
}

.single-counter {
  font-size: 0.7rem;
  color: var(--soft);
  font-family: var(--sans);
}

/* Thumbnail strip — hidden */
.thumb-strip { display: none; }

/* ══════════════════════════════════════════
   GRID VIEW
══════════════════════════════════════════ */
.grid-view { padding: 1.5rem 2rem 4rem; }
.grid-view.hidden { display: none; }

.grid-view .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-view .work-item { cursor: pointer; }

.grid-view .work-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--rule);
  transition: opacity 0.2s;
}

.grid-view .work-thumb.placeholder {
  background: linear-gradient(135deg, #eeeeee 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  color: var(--soft);
  letter-spacing: 0.05em;
}

.grid-view .work-item:hover .work-thumb { opacity: 0.8; }

.grid-view .work-caption { margin-top: 0.4rem; }

.grid-view .work-title {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink);
}

.grid-view .work-detail {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--soft);
  margin-top: 0.05rem;
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.single-stage img,
.single-stage .placeholder-img {
  animation: fadeIn 0.3s ease;
}

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 0.85rem; left: 0.85rem;
  z-index: 200;
  background: var(--bg);
  border: 1px solid var(--rule);
  font-size: 0.7rem;
  font-family: var(--sans);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 700px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: block; }
  .main { margin-left: 0; }
  .grid-view .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .single-stage { padding: 1rem; }
  .single-bottom { padding: 0.75rem 1rem; }
}
