:root {
  --bg: #090b10;
  --text: #f7f8fb;
  --muted: rgba(239, 243, 250, .58);
  --glass: rgba(255, 255, 255, .075);
  --glass-hover: rgba(255, 255, 255, .115);
  --line: rgba(255, 255, 255, .13);
  --line-strong: rgba(255, 255, 255, .22);
  --shadow: 0 24px 72px rgba(0, 0, 0, .30);
  --radius: 22px;
  --background-photo: none;
  --background-position-x: 50%;
  --background-position-y: 50%;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-image:
    linear-gradient(rgba(6, 8, 12, .48), rgba(6, 8, 12, .66)),
    var(--background-photo),
    radial-gradient(circle at 15% 10%, rgba(125, 145, 255, .23), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(93, 255, 219, .16), transparent 28rem),
    radial-gradient(circle at 62% 82%, rgba(214, 120, 255, .13), transparent 34rem),
    linear-gradient(145deg, #111722 0%, #090b10 68%);
  background-size: auto, cover, auto, auto, auto, auto;
  background-position:
    center,
    var(--background-position-x) var(--background-position-y),
    center,
    center,
    center,
    center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .18;
  pointer-events: none;
}

body::before {
  top: -11rem;
  right: -8rem;
  background: rgba(125, 165, 255, .8);
}

body::after {
  bottom: -12rem;
  left: -9rem;
  background: rgba(186, 115, 255, .65);
}

a { color: inherit; }

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0 38px;
}

.hero { margin-bottom: 44px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  line-height: .94;
  letter-spacing: -.055em;
  font-weight: 760;
}

section { margin-top: 42px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  color: rgba(255,255,255,.87);
  font-size: .78rem;
  letter-spacing: .17em;
}

.text-link,
.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: .86rem;
  transition: color .15s ease;
}

.text-link:hover,
.back-link:hover { color: var(--text); }

.links {
  display: grid;
  gap: 10px;
}

.link-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.095), rgba(255,255,255,.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  padding: 0 18px;
  border-radius: 18px;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
  border-color: var(--line-strong);
}

.link-card span:last-child {
  color: var(--muted);
  font-size: .9rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), var(--shadow);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  padding: 0;
  background: rgba(255,255,255,.05);
  cursor: pointer;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .26s ease, filter .2s ease;
}

.photo-tile:hover img {
  transform: scale(1.045);
  filter: brightness(1.04);
}

.photo-slot {
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}

.photo-grid-all,
.works-grid-all { margin-top: 34px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.work-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 14px 38px rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.work-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
}

.work-card-media {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255,255,255,.035);
}

.work-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .28s ease, filter .2s ease;
}

.work-card:hover .work-card-media img {
  transform: scale(1.035);
  filter: brightness(1.035);
}

.work-card-title {
  display: block;
  min-height: 42px;
  padding: 11px 12px 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .86rem;
  font-weight: 650;
}

.hidden { display: none !important; }

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  padding: 17px 2px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .76rem;
}

.subnav { margin-bottom: 46px; }
.page-title { margin-bottom: 8px; }

.viewer {
  width: min(920px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(18, 21, 29, .84);
  color: var(--text);
  box-shadow: 0 32px 110px rgba(0,0,0,.5);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
}

.viewer::backdrop {
  background: rgba(4, 6, 10, .72);
  backdrop-filter: blur(10px);
}

.viewer-stage {
  position: relative;
  min-height: 160px;
  background: rgba(0,0,0,.22);
  overflow: hidden;
  touch-action: pan-y;
}

.viewer-stage img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: rgba(0,0,0,.22);
  opacity: 0;
  transition: opacity .16s ease;
}

.viewer-stage img.is-ready { opacity: 1; }

.work-stage img { max-height: 65vh; }

.viewer-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  background: rgba(10,12,16,.48);
  color: rgba(255,255,255,.92);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.viewer-nav:hover {
  background: rgba(20,23,30,.74);
  border-color: rgba(255,255,255,.26);
}

.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }

.viewer-count {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(10,12,16,.5);
  color: rgba(255,255,255,.66);
  font-size: .7rem;
  backdrop-filter: blur(12px);
}

.lightbox-meta {
  padding: 14px 18px 18px;
}

.lightbox-meta time,
.workbox-meta time {
  color: var(--muted);
  font-size: .78rem;
}

.lightbox-meta p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.workbox-meta {
  padding: 18px 20px 21px;
}

.workbox-meta h2 {
  margin: 5px 0 8px;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.workbox-meta > p {
  margin: 0;
  color: rgba(247,248,251,.82);
  line-height: 1.72;
  white-space: pre-wrap;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.work-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: .8rem;
  background: rgba(255,255,255,.055);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.work-link-pill:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.25);
}

.pill-arrow {
  color: var(--muted);
  font-size: .78rem;
}

.close {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(10,12,16,.55);
  color: white;
  font-size: 1.35rem;
  cursor: pointer;
  backdrop-filter: blur(16px);
}

/* Cosmetic image-download deterrence */
.photo-grid img,
.lightbox img,
.works-grid img,
.workbox img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.bio {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 520px) {
  body {
    background-attachment: scroll;
  }

  .shell {
    width: min(100% - 22px, 720px);
    padding-top: 38px;
  }

  .hero { margin-bottom: 38px; }

  .photo-grid {
    gap: 4px;
    padding: 6px;
    border-radius: 15px;
  }

  .photo-tile,
  .photo-slot { border-radius: 8px; }

  .works-grid { gap: 6px; }

  .work-card { border-radius: 13px; }

  .work-card-title {
    min-height: 39px;
    padding: 9px 10px 10px;
    font-size: .78rem;
  }

  .viewer {
    width: calc(100% - 14px);
    max-height: calc(100vh - 14px);
    border-radius: 18px;
  }

  .viewer-nav {
    width: 42px;
    height: 42px;
    aspect-ratio: 1 / 1;
    font-size: 1.75rem;
  }

  .viewer-prev { left: 7px; }
  .viewer-next { right: 7px; }

  .workbox-meta { padding: 16px 16px 18px; }
}

.layout-disabled { display: none !important; }


/* Site build update notice */
.site-update-notice {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 8px 9px 8px 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  background: rgba(18,21,29,.88);
  box-shadow: 0 18px 55px rgba(0,0,0,.36);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.site-update-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.site-update-notice span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .78rem;
}

.site-update-notice button {
  flex: none;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.07);
  cursor: pointer;
}

.site-update-notice button:hover {
  background: rgba(255,255,255,.12);
}


/* SVG viewer navigation */
.viewer-nav-icon {
  width: 20px;
  height: 20px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

@media (max-width: 520px) {
  .viewer-nav-icon {
    width: 18px;
    height: 18px;
  }
}


/* v0.3.3a SVG close button geometry override */
.viewer-close.close {
  width: 38px;
  height: 38px;
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  line-height: 0;
  border-radius: 50%;
}

.viewer-close-icon {
  width: 16px;
  height: 16px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
