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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 214, 151, 0.34), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(126, 181, 195, 0.22), transparent 26%),
    linear-gradient(145deg, #fff0cf 0%, #c99083 25%, #5e7f8e 52%, #281026 78%, #120812 100%);
  color: #fff4dc;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
}

body:has(.journal),
body:has(.essay) {
  background:
    linear-gradient(180deg, rgba(38, 14, 35, 0.94) 0%, rgba(72, 35, 56, 0.72) 22%, rgba(72, 35, 56, 0) 54%),
    radial-gradient(circle at 18% 12%, rgba(255, 214, 151, 0.28), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(126, 181, 195, 0.2), transparent 26%),
    linear-gradient(145deg, #fff0cf 0%, #c99083 25%, #5e7f8e 52%, #281026 78%, #120812 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: 0;
  opacity: 0.32;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 72%, rgba(255, 255, 255, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 16%, rgba(255, 255, 255, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 58%, rgba(255, 255, 255, 0.86) 0 1px, transparent 2px),
    radial-gradient(circle at 91% 34%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 1px, transparent 1px, transparent 5px);
  background-size: 380px 380px, 460px 460px, 420px 420px, 520px 520px, 390px 390px, auto;
  animation: star-drift-a 34s ease-in-out infinite alternate;
}

body::after {
  inset: auto -8vw -16vh;
  height: 46vh;
  z-index: 0;
  opacity: 0.9;
  filter: blur(14px);
  background:
    linear-gradient(to top, rgba(255, 246, 218, 0.44), transparent 72%),
    radial-gradient(ellipse at 30% 82%, rgba(255, 255, 255, 0.42), transparent 58%),
    radial-gradient(ellipse at 76% 84%, rgba(255, 210, 184, 0.32), transparent 54%),
    radial-gradient(circle at 14% 24%, rgba(255, 255, 255, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 42%, rgba(255, 218, 171, 0.82) 0 2px, transparent 4px),
    radial-gradient(circle at 62% 18%, rgba(196, 235, 255, 0.72) 0 1px, transparent 3px),
    radial-gradient(circle at 82% 66%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 32%, rgba(255, 209, 184, 0.76) 0 2px, transparent 5px);
  background-size: auto, auto, auto, 310px 310px, 540px 540px, 460px 460px, 390px 390px, 620px 620px;
  animation: star-drift-b 48s ease-in-out infinite alternate;
}

@keyframes star-drift-a {
  from {
    background-position: 0 0, 20px 10px, 40px 0, 0 30px, 60px 20px, 0 0;
    transform: translate3d(0, 0, 0);
  }

  to {
    background-position: 24px -18px, -12px 24px, 68px 22px, 18px 0, 28px 48px, 0 0;
    transform: translate3d(0.8vw, -0.6vh, 0);
  }
}

@keyframes star-drift-b {
  from {
    background-position: 0 0, 0 0, 0 0, 10px 20px, 40px 0, 0 50px, 80px 10px, 20px 60px;
  }

  to {
    background-position: 0 0, 0 0, 0 0, 38px 4px, 10px 34px, 44px 18px, 40px 42px, 54px 22px;
  }
}

a {
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  opacity: 0.9;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff8c9;
  opacity: 1;
  text-shadow: 0 0 18px rgba(255, 221, 151, 0.55);
}

.serif {
  font-family: "Cormorant Garamond", serif;
}

.label {
  color: #ffd991;
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.78;
  text-transform: uppercase;
}

.muted,
.meta,
.preview,
.article-note,
.rec-note,
.event-date,
.image-tag {
  color: rgba(255, 244, 220, 0.72);
  opacity: 1;
}

.nav-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 20;
}

.nav {
  position: absolute;
  top: 14px;
  right: 24px;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 232, 189, 0.22);
  border-radius: 999px;
  background: rgba(28, 12, 30, 0.24);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 42px rgba(18, 8, 24, 0.22);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.82;
  text-transform: lowercase;
  transition: opacity 0.5s ease;
}

.nav-zone:hover .nav {
  opacity: 1;
}

.nav a {
  padding: 5px 9px;
  color: rgba(255, 244, 220, 0.95);
}

.nav a:hover {
  background: rgba(255, 236, 190, 0.14);
  box-shadow: inset 0 0 18px rgba(255, 238, 204, 0.08);
}

.entry,
.zone,
.journal,
.recs,
.log,
.essay {
  position: relative;
  z-index: 1;
}

.entry {
  min-height: 58vh;
  height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 80px 5vw 50px;
  background:
    linear-gradient(to bottom, rgba(16, 8, 22, 0.08), rgba(16, 8, 22, 0.58)),
    radial-gradient(ellipse at 48% 90%, rgba(255, 232, 180, 0.52), transparent 42%);
}

.entry::before {
  content: "";
  position: absolute;
  left: -12vw;
  right: -12vw;
  bottom: -14vh;
  height: 48vh;
  z-index: 1;
  filter: blur(16px);
  background:
    radial-gradient(ellipse at 18% 70%, rgba(255, 240, 215, 0.76), transparent 58%),
    radial-gradient(ellipse at 52% 60%, rgba(255, 221, 188, 0.62), transparent 55%),
    radial-gradient(ellipse at 86% 76%, rgba(255, 245, 218, 0.7), transparent 58%);
}

.entry > div {
  position: relative;
  z-index: 1;
  max-width: min(1120px, 100%);
}

.entry-title,
.journal-title,
.recs-title,
.log-title,
.essay-title {
  color: #fff2c6;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  line-height: 0.95;
  text-shadow:
    0 0 22px rgba(255, 195, 124, 0.48),
    0 0 48px rgba(114, 178, 195, 0.22);
}

.entry-title {
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.88;
}

.zone {
  padding: 72px 6vw;
}

.block {
  margin-bottom: 72px;
}

#portfolio {
  padding-bottom: 24px;
}

#portfolio .block:last-child {
  margin-bottom: 22px;
}

#calendar,
#about {
  padding-top: 24px;
  padding-bottom: 24px;
}

#calendar .block,
#about .block {
  margin-bottom: 18px;
}

.img {
  width: 100%;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 232, 189, 0.2);
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 22px 58px rgba(20, 8, 24, 0.18);
}

.img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  filter: sepia(0.16) saturate(1.35) contrast(0.96) brightness(0.96);
}

.img:not(.small) img {
  aspect-ratio: 16 / 10.5;
  object-fit: cover;
  object-position: center 58%;
}

.img.small img {
  aspect-ratio: 16 / 10;
  max-height: 72vh;
  object-fit: cover;
  object-position: center 38%;
}

.img.full img {
  aspect-ratio: auto;
  max-height: none;
  object-fit: contain;
}

.image-tag {
  margin: -4px 0 18px;
  font-size: 12px;
  text-align: right;
}

.shift-left {
  transform: translateX(-2vw);
}

.shift-right {
  transform: translateX(2vw);
}

.text {
  max-width: 680px;
}

.title,
.post-link,
.article-title,
.rec-title,
.event-title {
  color: #fff0c7;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  text-shadow: 0 0 18px rgba(255, 202, 136, 0.28);
}

.title {
  font-size: 30px;
}

.meta {
  margin-top: 6px;
  font-size: 12px;
}

.file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
}

.file-links a {
  padding: 5px 8px;
  border: 1px solid rgba(255, 232, 189, 0.18);
  background: rgba(255, 244, 220, 0.06);
  color: #ffe0a3;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cal-item,
.event {
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(255, 232, 189, 0.16);
  border-radius: 16px;
  background: rgba(255, 244, 220, 0.045);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cal-item {
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.fade {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.fade.in {
  opacity: 1;
}

.post-list,
.article-list,
.rec-list,
.event-list {
  display: flex;
  flex-direction: column;
}

.post-list {
  gap: 40px;
}

.post-link {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.preview {
  max-width: 760px;
  max-height: 0;
  overflow: hidden;
  font-size: 13px;
  opacity: 0;
  transition: all 0.25s ease;
}

.post:hover .preview {
  max-height: 120px;
  margin-top: 6px;
  opacity: 1;
}

.journal,
.recs,
.log,
.essay {
  max-width: 980px;
  margin: 0 auto;
  padding: 120px 4vw 180px;
}

.journal-header,
.recs-header,
.log-header {
  margin-bottom: 64px;
}

.essay-header {
  margin-bottom: 80px;
}

.journal-title,
.recs-title,
.log-title,
.essay-title {
  font-size: 64px;
}

.filters,
.tags,
.article-meta,
.rec-meta {
  display: flex;
  flex-wrap: wrap;
}

.filters {
  gap: 10px;
  margin-bottom: 52px;
}

.filter {
  appearance: none;
  padding: 9px 12px;
  border: 1px solid rgba(255, 232, 189, 0.26);
  border-radius: 999px;
  background: rgba(37, 14, 34, 0.18);
  color: rgba(255, 244, 220, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 0 24px rgba(255, 210, 150, 0.05);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

.filter:hover,
.filter.active {
  border-color: rgba(255, 214, 145, 0.82);
  background: rgba(255, 214, 145, 0.12);
  color: #fff5cf;
  box-shadow: 0 0 28px rgba(255, 188, 116, 0.22);
}

.article-list,
.rec-list {
  gap: 46px;
}

.article,
.rec {
  max-width: 780px;
  padding: 20px 22px 24px;
  border: 1px solid rgba(255, 232, 189, 0.16);
  border-radius: 18px;
  background: rgba(255, 244, 220, 0.035);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.article.hidden,
.rec.hidden {
  display: none;
}

.article-meta,
.rec-meta {
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(255, 244, 220, 0.72);
  font-size: 12px;
}

.article-title,
.rec-title {
  margin-bottom: 12px;
  font-size: 34px;
  line-height: 1.05;
}

.article-title a,
.rec-title a,
.journal-underlined {
  padding: 2px 6px;
  margin-left: -6px;
  border: 1px solid transparent;
  opacity: 0.88;
  text-decoration: underline;
  text-decoration-color: rgba(255, 216, 151, 0.46);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.article-title a:hover,
.rec-title a:hover,
.journal-underlined:hover,
.rec-note a:hover,
.footnotes a:hover,
.file-links a:hover,
.cal-item:hover {
  border-color: rgba(255, 232, 189, 0.28);
  background: rgba(255, 244, 220, 0.09);
  box-shadow: 0 0 28px rgba(255, 198, 128, 0.16);
}

.article-note,
.rec-note {
  max-width: 680px;
  font-size: 15px;
}

.rec-note a,
.footnotes a {
  padding: 1px 5px;
  border: 1px solid rgba(255, 232, 189, 0.12);
  background: rgba(255, 244, 220, 0.045);
  color: rgba(255, 244, 220, 0.9);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tags {
  gap: 8px;
  margin-top: 18px;
}

.tag {
  color: rgba(255, 216, 151, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-list {
  max-width: 780px;
}

.event {
  gap: 24px;
  margin-bottom: 10px;
  padding: 16px 18px;
}

.event-title {
  font-size: 30px;
  line-height: 1.1;
}

.event-date {
  flex: 0 0 auto;
  padding-top: 10px;
  font-size: 12px;
  text-align: right;
}

.essay-body {
  color: rgba(255, 246, 225, 0.88);
  font-size: 18px;
  line-height: 1.9;
}

.essay-body p {
  margin-bottom: 2rem;
}

.essay-body sup {
  opacity: 0.5;
  font-size: 0.7em;
}

.essay-body strong,
.essay-body em,
.footnotes em,
.footnotes strong {
  color: #fff6c8;
  text-shadow: 0 0 14px rgba(255, 211, 137, 0.22);
}

.essay-body strong {
  font-weight: 500;
}

.essay-body u {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.footnotes {
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 232, 189, 0.22);
  color: rgba(255, 246, 225, 0.88);
  font-size: 13px;
  line-height: 1.8;
}

.footnotes p {
  margin-bottom: 14px;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

@media (max-width: 640px) {
  .nav {
    right: 18px;
    gap: 10px;
    font-size: 11px;
  }

  .entry {
    padding: 42px 6vw;
  }

  .zone {
    padding: 58px 6vw;
  }

  .journal,
  .recs,
  .log,
  .essay {
    padding-top: 96px;
  }

  .journal-title,
  .recs-title,
  .log-title,
  .essay-title {
    font-size: 52px;
  }

  .article-title,
  .rec-title {
    font-size: 30px;
  }

  .event {
    flex-direction: column;
    gap: 4px;
  }

  .event-title {
    font-size: 28px;
  }

  .event-date {
    padding-top: 0;
    text-align: left;
  }
}
