/* ninacriswell.com — rebuilt from the Squarespace design
   Fixed left sidebar, two-column masonry galleries, white slideshow view. */

:root {
  --bg: #ffffff;
  --text: #666666;      /* body copy */
  --ink: #121212;       /* site title, headings */
  --nav: #1f1f1f;       /* nav links */
  --muted: #a3a3a3;     /* active nav item, folder labels */
  --rule: #e6e6e6;
  --link: #000000;

  --sidebar-x: 40px;    /* left margin of sidebar */
  --sidebar-w: 150px;
  --content-x: 250px;   /* where the content column starts */
  --gutter: 10px;     /* gap between gallery images */
  --font: "Figtree", "Proxima Nova", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------------------------ sidebar */

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: calc(var(--sidebar-x) + var(--sidebar-w));
  padding: 40px 0 40px var(--sidebar-x);
  overflow-y: auto;
}

.site-title {
  margin: 0 0 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--ink);
}

.menu-toggle { display: none; }

.nav, .nav ul { list-style: none; margin: 0; padding: 0; }

.nav a, .nav-folder-toggle {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--nav);
  transition: color .15s ease;
}
.nav a:hover, .nav-folder-toggle:hover { color: var(--muted); }

.nav-folder ul { display: none; padding: 2px 0 6px 6px; }
.nav-folder.is-open ul { display: block; }
.nav-folder ul a { font-size: 11.5px; }

.nav > li + li { margin-top: 4px; }
.nav > li.spaced { margin-top: 22px; }
.nav li.active > a { color: var(--muted); }

/* ------------------------------------------------------------------ content */

.content {
  margin-left: var(--content-x);
  padding: 15px 25px 60px 0;
  min-height: 100vh;
}

/* two-column masonry gallery (columns are built by site.js; plain stack without JS) */
.gallery { display: flex; flex-direction: column; gap: var(--gutter); }
.gallery.is-masonry { flex-direction: row; align-items: flex-start; }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gutter); }

.gallery-item { margin: 0; }
.gallery-item img, .code-grid img {
  width: 100%;
  background: #f6f6f6;
  cursor: zoom-in;
  transition: opacity .2s ease;
}
.gallery-link:hover img { opacity: .85; }
.gallery-item figcaption { display: none; }   /* shown in the slideshow instead */

/* ------------------------------------------------------------------ homepage */

/* 8 small images drifting slowly around one screen (movement handled by site.js) */
.page-float .content { padding: 0 25px 0 0; min-height: 0; }
.float-stage {
  position: relative;
  /* without JavaScript the images simply wrap */
  display: flex; flex-wrap: wrap; gap: 30px; align-items: center;
  padding: 40px 0;
}
.float-item { display: block; width: 160px; }
.float-stage.is-floating {
  display: block; padding: 0;
  height: 100vh;            /* exact height is set by site.js so nothing scrolls */
}
.float-stage.is-floating .float-item {
  position: absolute; left: 0; top: 0;
  will-change: transform;
}
.float-stage.is-floating .float-item img { height: 100%; object-fit: cover; }
.float-item img {
  width: 100%;
  background: #f6f6f6;
  transition: box-shadow .25s ease;
}
.float-item:hover, .float-item:focus-visible { z-index: 50 !important; }
.float-item:hover img, .float-item:focus-visible img { box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.float-item:focus-visible { outline: none; }
.float-item:focus-visible img { outline: 2px solid var(--ink); outline-offset: 3px; }

/* page name under the image on hover */
.float-item::after {
  content: attr(data-label);
  position: absolute; left: 0; top: 100%;
  padding-top: 5px;
  font-size: 11px; line-height: 1.3; color: var(--ink);
  white-space: nowrap;
  opacity: 0; transition: opacity .2s ease;
  pointer-events: none;
}
.float-item:hover::after, .float-item:focus-visible::after { opacity: 1; }
body.page-float { overflow-x: hidden; }
@media (min-width: 769px) { body.page-float { overflow: hidden; } }

/* ------------------------------------------------------------------ text pages */

.text-page { max-width: 940px; padding-top: 25px; }
.text-page:not(.wide) { max-width: 500px; margin-left: clamp(0px, 25vw - 60px, 330px); }

/* about: photo on the left, text on the right */
.about {
  display: grid;
  grid-template-columns: minmax(0, 288px) minmax(0, 611px);
  gap: 34px;
  align-items: start;
  padding: 25px 0 0 10px;
}
.about-photo { margin: 0; }
.about-photo img { width: 100%; background: #f6f6f6; }
.about .prose { max-width: none; }
.about .social { justify-content: flex-start; }

.prose { max-width: 620px; }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--link); border-bottom: 1px solid currentColor; }
.prose strong { color: inherit; font-weight: 700; }

.prose .page-heading, .page-heading {
  margin: 0 0 28px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.prose h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.prose h3 {
  margin: 34px 0 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text);
}

.cv { display: grid; grid-template-columns: 90px 1fr; gap: 6px 0; margin: 0; }
.cv dt, .cv dd { margin: 0; }

.social {
  list-style: none; display: flex; justify-content: center; gap: 14px;
  margin: 36px 0 0; padding: 0;
}
.social a { display: block; color: var(--ink); }
.social a:hover { color: var(--muted); }
.social svg { width: 17px; height: 17px; display: block; }

/* video pages */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; margin-bottom: 28px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* codes */
.project { margin-bottom: 10px; }
.project-hero { display: block; margin-bottom: 26px; }
.project-hero img { width: 100%; }
.project .prose { margin-bottom: 26px; }
.code-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.code-grid img { aspect-ratio: auto; height: auto; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 50px 0; }

/* ------------------------------------------------------------------ slideshow */

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: none;
  flex-direction: column;
}
.lightbox.is-open { display: flex; }
.lightbox-close {
  position: absolute; top: 14px; right: 16px; z-index: 1;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); border-radius: 50%;
  transition: background-color .15s ease, color .15s ease;
}
.lightbox-close:hover { background: #f2f2f2; }
.lightbox-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lightbox-close svg { width: 22px; height: 22px; display: block; }
.lightbox-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 60px 10px;
}
.lightbox-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  cursor: pointer;
}
.lightbox-bar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  padding: 12px 60px 30px;
  font-size: 11px; line-height: 1.5;
}
.lightbox-caption { color: var(--text); min-height: 1em; }
.lightbox-caption .cap-title { display: block; color: var(--ink); font-weight: 500; }
.lightbox-controls { display: flex; gap: 18px; white-space: nowrap; color: var(--nav); }
.lightbox-controls button:hover { color: var(--muted); }
.lightbox-count { color: var(--muted); }
body.lightbox-open { overflow: hidden; }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 768px) {
  .sidebar {
    position: static; width: auto; bottom: auto;
    padding: 20px 20px 10px; overflow: visible;
  }
  .sidebar-top { display: flex; justify-content: space-between; align-items: center; }
  .site-title { margin: 0; font-size: 16px; }
  .menu-toggle { display: block; font-size: 12px; font-weight: 500; color: var(--nav); }
  #site-nav { display: none; padding: 18px 0 6px; }
  .sidebar.nav-open #site-nav { display: block; }
  .nav a, .nav-folder-toggle { font-size: 14px; line-height: 1.9; }
  .nav-folder ul a { font-size: 13px; }

  .content { margin-left: 0; padding: 10px 20px 50px; }
  .text-page:not(.wide) { margin-left: 0; }
  .page-float .content { padding: 0 20px; }
  .float-item::after { display: none; }
  .about { grid-template-columns: 1fr; gap: 28px; padding: 10px 0 0; }
  .about-photo { max-width: 430px; }
  .about .social { justify-content: center; }
  .page-heading { font-size: 26px; }
  .code-grid { grid-template-columns: 1fr 1fr; }
  .lightbox-stage { padding: 20px 10px 6px; }
  .lightbox-bar { padding: 10px 16px 24px; flex-direction: column; align-items: flex-start; }
}
