:root {
  --sidebar-width: 292px;
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #181818;
  --muted: #777777;
  --soft: #a0a0a0;
  --line: #e7e7e7;
  --transition: 320ms cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

/* RIGHT SIDEBAR */
.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--sidebar-width);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 26px 30px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

.profile-link {
  width: 100%;
  text-decoration: none;
}

.profile-image {
  width: min(100%, 210px);
  aspect-ratio: 1;
  margin: 0 auto;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.03);
  background: #f1f1f1;
}

.identity {
  margin-top: 14px;
  text-align: center;
  line-height: 1.08;
}
.identity-name {
  display: block;
  font-size: 1.48rem;
  font-weight: 300;
  letter-spacing: .015em;
}
.identity-role {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
}

.primary-nav {
  width: 100%;
  margin-top: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.nav-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-link {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: none;
  color: var(--muted);
  font-size: .83rem;
  letter-spacing: .065em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -7px;
  height: 1px;
  background: var(--text);
  transition: left var(--transition), right var(--transition);
}
.nav-link:hover,
.nav-link[aria-current="page"],
.portfolio-toggle[aria-expanded="true"] {
  color: var(--text);
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after,
.portfolio-toggle[aria-expanded="true"]::after {
  left: 0;
  right: 0;
}

.portfolio-submenu {
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  margin-top: 0;
  transition: max-height 420ms ease, opacity 260ms ease, margin-top 320ms ease;
}
.portfolio-submenu.open {
  max-height: 260px;
  opacity: 1;
  margin-top: 22px;
}
.portfolio-submenu a {
  max-width: 220px;
  text-align: center;
  text-decoration: none;
  color: #8b8b8b;
  font-size: .72rem;
  line-height: 1.35;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color 180ms ease;
}
.portfolio-submenu a:hover,
.portfolio-submenu a.is-active {
  color: #111;
}
.portfolio-submenu a.is-active {
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 50px;
  color: #a0a0a0;
  font-size: .7rem;
  letter-spacing: .045em;
  text-align: center;
}

/* HOME */
.home { overflow: hidden; background: #fff; }
.home-stage {
  position: fixed;
  inset: 0 var(--sidebar-width) 0 0;
  background: #efefef;
}
.bg-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.008);
  transition: opacity 1.5s ease, transform 10s linear;
  will-change: opacity, transform;
}
.bg-slide.is-visible {
  opacity: 1;
  transform: scale(1.025);
}

/* INTERNAL PAGES */
.page-shell {
  min-height: 100vh;
  padding-right: var(--sidebar-width);
  background: #fff;
}
.content {
  min-height: 100vh;
  padding: 54px clamp(32px, 5vw, 92px) 80px;
  background: #fff;
}
.page-kicker {
  margin: 0 0 12px;
  color: #9a9a9a;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.page-title {
  margin: 0;
  color: #161616;
  font-size: clamp(2.35rem, 4vw, 4.8rem);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -.035em;
}
.collection-count {
  margin: 16px 0 0;
  color: #9b9b9b;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* PORTFOLIO */
.portfolio-content { max-width: 1800px; }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
}
.photo-card {
  position: relative;
  padding: 0;
  border: 0;
  background: #f2f2f2;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  overflow: hidden;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 560ms cubic-bezier(.2,.7,.2,1), opacity 260ms ease;
}
.photo-card:hover img { transform: scale(1.025); }
.photo-card:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.empty-collection {
  margin: 42px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #888;
  font-size: .95rem;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-image {
  max-width: min(90vw, 1600px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 15px 50px rgba(0,0,0,.08);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  background: transparent;
  color: #6f6f6f;
  cursor: pointer;
  transition: color 180ms ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: #111; }
.lightbox-close { top: 17px; right: 22px; font-size: 2rem; line-height: 1; }
.lightbox-prev,
.lightbox-next { top: 50%; transform: translateY(-50%); font-size: 2.5rem; padding: 16px; }
.lightbox-prev { left: 7px; }
.lightbox-next { right: 7px; }
.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 17px;
  transform: translateX(-50%);
  color: #8d8d8d;
  font-size: .72rem;
  letter-spacing: .1em;
}

/* ABOUT */
.about-content { max-width: 1500px; }
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: start;
  margin-top: 48px;
  max-width: 1120px;
}
.about-copy {
  color: #5f5f5f;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.8;
}
.about-copy p { margin: 0 0 22px; }
.about-copy strong { color: #202020; font-weight: 400; }
.about-meta {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.meta-group + .meta-group { margin-top: 28px; }
.meta-label {
  display: block;
  margin-bottom: 10px;
  color: #a0a0a0;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.meta-value {
  color: #555;
  font-size: .9rem;
  line-height: 1.75;
}

@media (max-width: 1180px) {
  :root { --sidebar-width: 252px; }
  .sidebar { padding-inline: 20px; }
  .profile-image { width: 188px; }
  .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --sidebar-width: 218px; }
  .profile-image { width: 164px; }
  .identity-name { font-size: 1.25rem; }
  .identity-role { font-size: .9rem; }
  .primary-nav { margin-top: 52px; }
  .portfolio-submenu a { font-size: .66rem; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-layout { grid-template-columns: 1fr; gap: 38px; }
}

@media (max-width: 640px) {
  body.home { overflow: auto; }
  .sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: auto;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 28px;
  }
  .profile-image { width: 148px; }
  .identity-name { font-size: 1.4rem; }
  .identity-role { font-size: .96rem; }
  .primary-nav { margin-top: 44px; gap: 28px; }
  .portfolio-submenu.open { max-height: 320px; }
  .sidebar-footer { display: none; }

  .home-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 58svh;
  }
  .page-shell { padding-right: 0; }
  .page-shell .sidebar { position: relative; }
  .content { min-height: auto; padding: 40px 20px 64px; }
  .page-title { font-size: clamp(2.45rem, 15vw, 4.2rem); }
  .portfolio-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
  .lightbox-prev, .lightbox-next { font-size: 2rem; padding: 10px; }
  .lightbox-image { max-width: 96vw; max-height: 82vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .bg-slide { transform: none !important; }
}
