* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: #F4F0E8;
  min-height: 100vh;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 20px;
  padding: 28px 40px 0;
}

.badge {
  grid-column: 1;
  padding-left: 340px;
  grid-row: 1;
  justify-self: start;
  color: rgb(26, 26, 26);
  font-size: 23px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.badge.is-current {
  color: #C9C4B8;
}

.badge:hover {
  background: linear-gradient(90deg, rgb(26, 26, 26) 0%, #C9C4B8 45%, #F4F0E8 50%, #C9C4B8 55%, rgb(26, 26, 26) 100%);
  background-size: 250% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: badge-glimmer 0.8s ease-in-out 1;
}

@keyframes badge-glimmer {
  0% { background-position: 150% center; }
  100% { background-position: -50% center; }
}

.nav-links {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  column-gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a {
  position: relative;
  display: block;
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15.9375px;
  height: 26.2875px;
  color: rgb(26, 26, 26);
  text-decoration-line: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nav-links a.underlined {
  text-decoration-line: underline;
}

.nav-links a.is-current {
  color: #C9C4B8;
}

.nav-links a:hover {
  background: linear-gradient(90deg, rgb(26, 26, 26) 0%, #C9C4B8 45%, #F4F0E8 50%, #C9C4B8 55%, rgb(26, 26, 26) 100%);
  background-size: 250% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: badge-glimmer 0.8s ease-in-out 1;
}

.nav-links a:not(.underlined)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0%;
  height: 1px;
  background-color: rgb(26, 26, 26);
  transition: width 0.35s ease;
}

.nav-links a:not(.underlined):hover::after {
  width: 100%;
}

.separator {
  width: 2px;
  height: 19px;
  background-color: #C9C4B8;
}

.divider {
  grid-column: 1 / 3;
  grid-row: 2;
  height: 2px;
  background-color: #C9C4B8;
  margin-top: 20px;
  margin-left: 340px;
  width: calc(100% - 340px);
}

.reading-content {
  margin-top: 80px;
  margin-left: 380px;
}

.home-content {
  margin-top: 80px;
  margin-left: 380px;
}

.home-title {
  align-items: flex-end;
  box-sizing: border-box;
  color: rgb(26, 26, 26);
  color-scheme: light;
  column-gap: 10.2px;
  display: flex;
  flex-wrap: wrap;
  font-family: "Instrument Serif", Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 44.2px;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
}

.home-ipa {
  margin-top: 8px;
  box-sizing: border-box;
  color: rgb(50, 50, 50);
  color-scheme: light;
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  height: auto;
  letter-spacing: -0.159375px;
  line-height: 17px;
  margin-bottom: 5.95px;
}

.home-meta .home-ipa + .home-ipa {
  margin-top: 8px;
}

.home-content .reading-subtitle {
  margin-top: 50px;
}

.home-content .reading-body {
  margin-top: 12px;
}

.sfu-inline {
  display: inline-flex;
  align-items: center;
}

.sfu-logo {
  height: 17px;
  width: auto;
  margin-left: 6px;
  position: relative;
  top: -3px;
}

.glossary-section {
  margin-top: 40px;
}

.glossary-title {
  font-family: Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 28.05px;
  color: rgb(26, 26, 26);
  font-weight: 700;
  margin: 0;
}

.home-title:hover {
  background: linear-gradient(90deg, rgb(26, 26, 26) 0%, #C9C4B8 45%, #F4F0E8 50%, #C9C4B8 55%, rgb(26, 26, 26) 100%);
  background-size: 250% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: badge-glimmer 0.8s ease-in-out 1;
}

.reading-title {
  font-family: "Instrument Serif", Newsreader, ui-serif, Georgia;
  font-size: 44.4px;
  font-weight: 700;
  color: rgb(26, 26, 26);
  margin: 0 0 16px;
}

.reading-subtitle {
  box-sizing: border-box;
  color: rgb(26, 26, 26);
  color-scheme: light;
  display: block;
  font-family: Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 17px;
  min-height: 28.05px;
  line-height: 28.05px;
  margin: 0 0 16px;
}

.reading-body {
  font-family: Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 28.05px;
  color: black;
  margin: 0;
  max-width: 600px;
}

.now-section {
  margin-top: 80px;
  margin-left: 380px;
}

.now-title {
  display: block;
  color: rgb(26, 26, 26);
  color-scheme: light;
  font-family: "Instrument Serif", Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 28.9px;
  font-weight: 400;
  margin: 0 0 16px;
}

.reading-item {
  display: flex;
  align-items: flex-start;
  column-gap: 10px;
}

.reading-item + .reading-item {
  margin-top: 16px;
}

.content-divider {
  height: 2px;
  background-color: #C9C4B8;
  margin-top: 40px;
  margin-left: 380px;
  width: calc(100% - 380px - 40px);
}

.reading-item .bullet {
  flex-shrink: 0;
  font-family: Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 28.05px;
  color: black;
}

.reading-item .reading-body {
  flex: 1;
}

.reading-body a {
  color: rgb(26, 26, 26);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.reading-body a:hover {
  color: #C9C4B8;
}

.glimmer-link:hover {
  background: linear-gradient(90deg, rgb(26, 26, 26) 0%, #C9C4B8 45%, #F4F0E8 50%, #C9C4B8 55%, rgb(26, 26, 26) 100%);
  background-size: 250% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: badge-glimmer 0.8s ease-in-out 1;
}

.glossary-section .reading-item {
  align-items: center;
}

.glossary-section .reading-item + .reading-item {
  margin-top: 3px;
}

.glossary-bullet {
  flex-shrink: 0;
  font-family: Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 28.05px;
  color: rgb(50, 50, 50);
  position: relative;
  top: -2px;
}

.social-links {
  margin-top: 20px;
  margin-left: 380px;
  margin-bottom: 20px;
}

.social-link {
  color: rgb(26, 26, 26);
  color-scheme: light;
  cursor: pointer;
  display: inline;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14.875px;
  height: auto;
  line-height: 24.5438px;
  margin-right: 20px;
  text-decoration: none;
}

.social-link:hover {
  background: linear-gradient(90deg, rgb(26, 26, 26) 0%, #C9C4B8 45%, #F4F0E8 50%, #C9C4B8 55%, rgb(26, 26, 26) 100%);
  background-size: 250% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: badge-glimmer 0.8s ease-in-out 1;
}

.listening-content {
  margin-top: 80px;
  margin-left: 380px;
}

.projects-content {
  margin-top: 80px;
  margin-left: 380px;
}

.project-list {
  margin-top: 40px;
}

.project-item {
  max-width: 640px;
}

.project-item + .project-item {
  margin-top: 40px;
}

.project-title {
  display: block;
  font-family: "Instrument Serif", Newsreader, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 28.9px;
  font-weight: 400;
  color: rgb(26, 26, 26);
  margin: 0 0 4px;
}

.project-status {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
  color: rgb(26, 26, 26);
  margin-left: 10px;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.project-item .reading-body {
  margin-top: 0;
}

.project-item .reading-body + .reading-body {
  margin-top: 8px;
}

.project-item .reading-body em {
  font-size: 14px;
  color: rgb(50, 50, 50);
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 700px;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .cover-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 650px) {
  .cover-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .cover-grid { grid-template-columns: repeat(1, 1fr); }
}

.cover-item {
  min-width: 0;
}

.cover-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.cover-item:hover img {
  transform: translateY(-6px);
}

.cover-title {
  box-sizing: border-box;
  color: rgb(26, 26, 26);
  color-scheme: light;
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.8125px;
  height: 18.6375px;
  line-height: 18.6469px;
  margin-top: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cover-artist {
  box-sizing: border-box;
  color: rgb(90, 90, 90);
  color-scheme: light;
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.8125px;
  height: 37.275px;
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.photos-content {
  margin-top: 80px;
  margin-left: 380px;
  margin-right: 40px;
}

.photo-grid {
  column-count: 3;
  column-gap: 20px;
  max-width: 700px;
  margin-top: 32px;
}

.photo-item {
  break-inside: avoid;
  margin-bottom: 20px;
  cursor: pointer;
  overflow: hidden;
}

.photo-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.photo-item:hover img {
  transform: translateY(-4px);
  opacity: 0.9;
}

@media (max-width: 1100px) {
  .photo-grid { column-count: 2; }
}

@media (max-width: 700px) {
  .photo-grid { column-count: 1; }
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 240, 232, 0.88);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
  z-index: 1000;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lightbox-image {
  max-width: min(80vw, 900px);
  max-height: 78vh;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.lightbox.is-open .lightbox-image {
  transform: scale(1);
  opacity: 1;
}

.lightbox-image.is-flipping {
  animation: lightbox-flip 0.4s ease;
}

@keyframes lightbox-flip {
  0% { transform: scale(1) rotateY(0deg); opacity: 1; }
  45% { transform: scale(0.96) rotateY(90deg); opacity: 0.2; }
  55% { transform: scale(0.96) rotateY(-90deg); opacity: 0.2; }
  100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.lightbox-caption {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.8125px;
  color: rgb(26, 26, 26);
  background: rgba(244, 240, 232, 0.85);
  padding: 6px 14px;
  max-width: 80vw;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  color: rgb(26, 26, 26);
  font-family: "Instrument Serif", Newsreader, ui-serif, Georgia;
  line-height: 1;
  padding: 12px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #C9C4B8;
}

.lightbox-close {
  top: 24px;
  right: 32px;
  font-size: 28px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
}

@media (max-width: 1100px) {
  .navbar {
    padding: 28px clamp(16px, 4vw, 40px) 0;
  }

  .badge {
    padding-left: clamp(20px, 20vw, 340px);
  }

  .divider {
    margin-left: clamp(20px, 20vw, 340px);
    width: calc(100% - clamp(20px, 20vw, 340px));
  }

  .nav-links a {
    font-size: clamp(11px, 1.6vw, 15.9375px);
  }

  .content-divider {
    margin-left: clamp(20px, 20vw, 340px);
    width: calc(100% - clamp(20px, 20vw, 340px) - 40px);
  }

  .home-title {
    font-size: clamp(28px, 8vw, 44.2px);
  }

  .reading-title {
    font-size: clamp(28px, 8vw, 44.4px);
  }

  .reading-content,
  .home-content,
  .now-section,
  .listening-content,
  .photos-content,
  .projects-content,
  .social-links {
    margin-left: calc(clamp(16px, 4vw, 40px) + clamp(20px, 20vw, 340px));
  }

  .photos-content,
  .listening-content {
    margin-right: 20px;
  }
}
