/* ============================================================
   Shared Styles — Photographer Homepage (川内伦子风格)
   ============================================================ */

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

:root {
  --sidebar-w: 360px;
  --sidebar-pad: 50px;
  --bg-sidebar: #eaeeee;
  --bg-content: #ffffff;
  --text: #1a1a1a;
  --text-light: #888888;
  --text-muted: #aaaaaa;
  --accent: #000000;
  --font-serif: 'Noto Serif SC', 'Yu Mincho', 'Hiragino Mincho Pro', serif;
  --font-sans: 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg-content);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--text-light);
}

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

/* ============================================================
   Layout
   ============================================================ */

.page-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   Sidebar (desktop)
   ============================================================ */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-sidebar);
  padding: var(--sidebar-pad);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  font-family: var(--font-serif);
  font-size: 1.75rem;   /* ~28px */
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 3rem;
  color: var(--text);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.sidebar-nav a {
  font-family: var(--font-serif);
  font-size: 0.875rem;  /* 14px */
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding-left: 1.2em;
  position: relative;
  transition: color 0.25s ease;
  display: inline-block;
}

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

.sidebar-nav a.active {
  color: var(--text);
}

/* Current page indicator — 4px black dot */
.sidebar-nav a.active::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-top: -1px;
}

.sidebar-bio {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.9;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.sidebar-contact {
  font-size: 0.72rem;
  color: #bbbbbb;
  line-height: 2;
}

.sidebar-contact a {
  color: inherit;
  transition: color 0.25s ease;
}

.sidebar-contact a:hover {
  color: var(--text);
}

/* ============================================================
   Main content (right panel)
   ============================================================ */

.main-content {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
  background: var(--bg-content);
}

/* ============================================================
   Mobile top nav (< 1023px)
   ============================================================ */

.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-sidebar);
  padding: 1.2rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.mobile-topbar-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.mobile-topbar-logo a {
  color: var(--text);
}

.mobile-menu-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-light);
  cursor: pointer;
  background: none;
  border: none;
  letter-spacing: 0.05em;
}

/* Mobile fullscreen menu */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-sidebar);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav-overlay.open {
  display: flex;
}

.mobile-nav-overlay .mobile-nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.mobile-nav-overlay .mobile-nav-brand {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.mobile-nav-overlay a {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--text);
  transition: color 0.25s ease;
}

.mobile-nav-overlay a:hover,
.mobile-nav-overlay a.active {
  color: var(--text-light);
}

/* Mobile current page dot */
.mobile-nav-overlay a.active::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.5em;
  vertical-align: middle;
  margin-top: -2px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1023px) {
  .page-layout {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

/* ============================================================
   Lightbox
   ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.97);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  animation: lightboxIn 0.2s ease;
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 1.6rem;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--text);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 2rem 1.5rem;
  user-select: none;
  transition: color 0.2s;
}

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

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

.lightbox-counter {
  margin-top: 1.2rem;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ============================================================
   Fade-in animation for elements
   ============================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
