/* ---------- Novella Vaga ---------- */

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

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #0d0c0a;
  --cream: #f3ede2;
  --muted: rgba(243, 237, 226, 0.68);
  --faint: rgba(243, 237, 226, 0.12);
  --spine: #7d724f;
  --spine-dark: #5f5638;
  --edge: env(safe-area-inset-left, 0px);
  --edge-r: env(safe-area-inset-right, 0px);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Hero & Nav ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.nav {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1240px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px calc(20px + var(--edge-r)) 18px calc(20px + var(--edge));
  animation: fadeDown 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (min-width: 700px) {
  .nav { padding: 22px calc(32px + var(--edge-r)) 22px calc(32px + var(--edge)); }
}

@media (min-width: 960px) {
  .nav { padding: 26px calc(40px + var(--edge-r)) 26px calc(40px + var(--edge)); }
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Fraunces', serif;
  font-size: clamp(19px, 4.6vw, 23px);
  font-weight: 500;
  font-variation-settings: 'opsz' 40;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.25s ease;
}

.logo em {
  font-style: italic;
  font-weight: 400;
  margin-left: 0.22em;
}

@media (hover: hover) and (pointer: fine) {
  .logo:hover {
    opacity: 0.8;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-join {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-join:hover {
    color: var(--cream);
  }
}

.btn-pill {
  display: inline-block;
  background: var(--cream);
  color: #171512;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .btn-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(243, 237, 226, 0.2);
  }
}

.btn-ghost {
  display: inline-block;
  color: var(--cream);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(243, 237, 226, 0.35);
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    background: var(--cream);
    color: #171512;
  }
}

/* ---------- Title ---------- */

.title {
  position: relative;
  z-index: 10;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(38px, 11vw, 160px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-top: clamp(44px, 10vh, 140px);
  padding: 0 12px;
  text-align: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

@media (max-width: 699px) {
  .hero {
    padding-bottom: 40vh;
    padding-bottom: 40svh;
  }

  .title {
    font-size: 12.5vw;
    margin-top: auto;
    margin-bottom: auto;
    padding: 0 10px;
  }

  .title-line:nth-child(1) {
    font-size: 0.68em;
  }
}

@media (min-width: 560px) {
  .title {
    letter-spacing: -0.03em;
    padding: 0;
  }
}

.title::before {
  content: '';
  position: absolute;
  inset: -30% -14%;
  background: radial-gradient(ellipse 58% 52% at 50% 46%, rgba(243, 237, 226, 0.08), transparent 70%);
  z-index: -1;
}

.title-line {
  display: block;
}

.title-line:nth-child(1) {
  font-size: 0.62em;
}

.title-line:nth-child(2) {
  font-size: 1.24em;
  margin-top: 0.04em;
  margin-bottom: -0.22em;
  color: var(--cream);
}

.title-italic {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.015em;
}

.tl-ch {
  display: inline-block;
  animation: tlColorCycle 10s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.32s);
}

@keyframes tlColorCycle {
  0%   { color: #eec783; }
  16%  { color: #e3a06a; }
  33%  { color: #dd9494; }
  50%  { color: #c592c6; }
  66%  { color: #92b0cd; }
  83%  { color: #a8c98f; }
  100% { color: #eec783; }
}

/* ---------- Book shelf ---------- */

.shelf-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(200px, 38vh, 520px);
  overflow: hidden;
  z-index: 5;
  touch-action: pan-y;
  animation: shelfIn 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

@media (max-width: 699px) {
  .shelf-wrap { height: clamp(300px, 56vh, 500px); }
}

@media (min-width: 700px) {
  .shelf-wrap { height: clamp(260px, 44vh, 520px); }
}

@media (min-width: 960px) {
  .shelf-wrap { height: 52vh; }
}

.shelf-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34%;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
  z-index: 8;
  pointer-events: none;
}

.shelf {
  position: absolute;
  bottom: -4vh;
  left: -12%;
  width: 124%;
  perspective: 1200px;
  transform: rotate(-3deg);
  transform-origin: 50% 100%;
}

@media (max-width: 699px) {
  .shelf {
    bottom: 2vh;
    transform: rotate(-2.5deg);
  }
}

@media (min-width: 960px) {
  .shelf {
    bottom: -8vh;
    perspective: 1600px;
    transform: rotate(-4.5deg);
  }
}

.track {
  display: flex;
  align-items: flex-end;
  width: max-content;
  animation: drift 80s linear infinite;
  will-change: transform;
}

@media (max-width: 699px) {
  .track { animation-duration: 45s; }
}

.book {
  position: relative;
  display: block;
  width: 146px;
  height: 224px;
  margin-right: -44px;
  transform-style: preserve-3d;
  transform: rotateY(42deg);
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 420px) {
  .book {
    width: 152px;
    height: 232px;
    margin-right: -52px;
  }
}

@media (min-width: 700px) {
  .book {
    width: 156px;
    height: 240px;
    margin-right: -70px;
    transform: rotateY(48deg);
  }
}

@media (min-width: 960px) {
  .book {
    width: 200px;
    height: 305px;
    margin-right: -78px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .book:hover {
    transform: rotateY(36deg) translateY(-16px);
    z-index: 30;
  }
}

.book.active {
  transform: rotateY(14deg) translateY(-14px) scale(1.04);
  z-index: 40;
}

.cover {
  position: absolute;
  inset: 0;
  border-radius: 3px 8px 8px 3px;
  transform: translateZ(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  gap: 9px;
  box-shadow: -14px 10px 26px rgba(0, 0, 0, 0.5);
  backface-visibility: hidden;
}

@media (min-width: 700px) {
  .cover {
    padding: 22px 16px;
    gap: 11px;
    box-shadow: -16px 12px 30px rgba(0, 0, 0, 0.52);
  }
}

@media (min-width: 960px) {
  .cover {
    padding: 26px 20px;
    gap: 13px;
    box-shadow: -18px 14px 34px rgba(0, 0, 0, 0.55);
  }
}

.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.14) 0%, transparent 28%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
}

.cover::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: rgba(0, 0, 0, 0.18);
}

.spine {
  position: absolute;
  top: 0;
  left: -12px;
  width: 24px;
  height: 100%;
  transform: rotateY(-90deg);
  background: linear-gradient(180deg, var(--spine) 0%, var(--spine-dark) 100%);
  border-radius: 3px 0 0 3px;
}

@media (min-width: 960px) {
  .spine {
    left: -16px;
    width: 32px;
  }
}

.pages {
  position: absolute;
  top: 3px;
  bottom: 3px;
  right: -11px;
  width: 21px;
  transform: rotateY(90deg);
  background: repeating-linear-gradient(180deg, #e8e0cf 0px, #e8e0cf 2px, #d6cdb8 3px);
  border-radius: 0 2px 2px 0;
}

@media (min-width: 960px) {
  .pages {
    top: 4px;
    bottom: 4px;
    right: -14px;
    width: 28px;
  }
}

.cover .kicker {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}

@media (min-width: 700px) {
  .cover .kicker { font-size: 8px; letter-spacing: 0.22em; }
}

.cover h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.14;
  letter-spacing: 0.01em;
}

@media (min-width: 700px) {
  .cover h3 { font-size: 19px; }
}

@media (min-width: 960px) {
  .cover h3 { font-size: 24px; }
}

.cover .author {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 4px;
}

@media (min-width: 700px) {
  .cover .author { font-size: 9.5px; letter-spacing: 0.16em; margin-top: 6px; }
}

.cover .ornament {
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

@media (min-width: 700px) {
  .cover .ornament { width: 34px; }
}

.c-cream { background: #efe8da; color: #2b2620; }
.c-paper { background: #f5f1e6; color: #35405c; }
.c-navy { background: linear-gradient(180deg, #1d2438 0%, #10141f 100%); color: #e9e2d2; }
.c-noir { background: linear-gradient(180deg, #23201c 0%, #141210 100%); color: #ded6c4; }
.c-sun { background: #f6edc9; color: #b4482e; }
.c-sun h3 { font-style: italic; }
.c-orange { background: #d95f1e; color: #f8f2e4; }
.c-forest { background: linear-gradient(180deg, #2b3327 0%, #1a2018 100%); color: #e6dfc9; }
.c-wine { background: linear-gradient(180deg, #4a1f24 0%, #2c1114 100%); color: #ecdfc8; }
.c-steel { background: linear-gradient(180deg, #2a3b40 0%, #162225 100%); color: #d8e4e2; }
.c-heart { background: linear-gradient(180deg, #26402f 0%, #14251b 100%); color: #e3dcb8; }

/* ---------- Sections & footer ---------- */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px calc(20px + var(--edge-r)) 20px calc(20px + var(--edge));
}

@media (min-width: 560px) {
  .section { padding: 80px calc(24px + var(--edge-r)) 20px calc(24px + var(--edge)); }
}

@media (min-width: 860px) {
  .section { padding: 96px calc(32px + var(--edge-r)) 24px calc(32px + var(--edge)); }
}

@media (min-width: 960px) {
  .section { padding: 110px calc(40px + var(--edge-r)) 30px calc(40px + var(--edge)); }
}

.eyebrow-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.section h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(30px, 7vw, 54px);
  letter-spacing: -0.01em;
  margin-bottom: 36px;
}

@media (min-width: 700px) {
  .section h2 { margin-bottom: 48px; }
}

.footer {
  display: flex;
  justify-content: center;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px calc(20px + var(--edge-r)) 30px calc(20px + var(--edge));
  border-top: 1px solid var(--faint);
  font-size: 13px;
  color: var(--muted);
}

@media (min-width: 700px) {
  .footer { padding: 30px calc(40px + var(--edge-r)) 40px calc(40px + var(--edge)); }
}

/* ---------- Keyframes ---------- */

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shelfIn {
  from { opacity: 0; transform: translateY(90px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

.sync-status {
  font-size: 13px;
  color: var(--muted);
  margin: -30px 0 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(243, 237, 226, 0.35);
  flex-shrink: 0;
}

.sync-status.ok::before {
  background: #7fb27a;
  box-shadow: 0 0 8px rgba(127, 178, 122, 0.6);
}

/* ---------- Content layout ---------- */

.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: start;
  max-width: 1280px;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  position: static;
  order: -1;
  width: 100%;
  min-width: 0;
  max-width: 480px;
  margin: 0 auto 8px;
}

@media (min-width: 960px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
  }

  .content-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 32px;
    order: 0;
    max-width: none;
    margin: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .content-sidebar::-webkit-scrollbar {
    display: none;
  }
}

@media (min-width: 1180px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 560px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ---------- Publication Cards ---------- */

.pub-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

@media (min-width: 700px) {
  .pub-card {
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

@media (hover: hover) and (pointer: fine) {
  .pub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  }
}

.pub-card-media {
  position: absolute;
  inset: 0;
}

.pub-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .pub-card:hover .pub-card-media img {
    transform: scale(1.05);
  }
}

.pub-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 32%, transparent 52%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}

.pub-card-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

@media (min-width: 700px) {
  .pub-card-top { top: 14px; left: 14px; right: 14px; }
}

.pub-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.pub-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #17140f url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f3ede2"><circle cx="12" cy="9" r="4"/><path d="M4 20c0-4 4-6 8-6s8 2 8 6"/></svg>') center/70% no-repeat;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.pub-card-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  color: #1c1913;
  border-radius: 999px;
  padding: 5px 11px;
}

@media (min-width: 700px) {
  .pub-card-badge {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    padding: 6px 13px;
  }
}

.pub-card-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
}

@media (min-width: 700px) {
  .pub-card-bottom { left: 16px; right: 16px; bottom: 14px; }
}

.pub-card-bottom h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 3.6vw, 20px);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-card-date {
  display: inline-block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

@media (min-width: 700px) {
  .pub-card-date { margin-top: 6px; font-size: 12px; }
}

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 48px 16px;
}

@media (min-width: 700px) {
  .grid-empty { font-size: 15px; padding: 60px 20px; }
}

.section-head {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 700px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 48px;
  }
}

.section-head h2 {
  margin-bottom: 0;
}

.cat-filter {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  background: rgba(243, 237, 226, 0.05) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23f3ede2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 16px center / 14px;
  border: 1px solid rgba(243, 237, 226, 0.25);
  border-radius: 999px;
  padding: 12px 44px 12px 20px;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

@media (min-width: 700px) {
  .cat-filter { width: auto; }
}

.cat-filter:focus {
  border-color: rgba(243, 237, 226, 0.55);
  background-color: rgba(243, 237, 226, 0.09);
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .cat-filter:hover {
    border-color: rgba(243, 237, 226, 0.55);
    background-color: rgba(243, 237, 226, 0.09);
  }
}

.cat-filter option {
  background: #171512;
  color: var(--cream);
}

.pub-card.hidden {
  display: none;
}

/* ---------- Sidebar ---------- */

.profile-card {
  border: 1px solid rgba(243, 237, 226, 0.16);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(243, 237, 226, 0.055) 0%, rgba(243, 237, 226, 0.02) 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

@media (min-width: 700px) {
  .profile-card { border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
}

.profile-banner {
  position: relative;
  height: 140px;
  background: linear-gradient(120deg, #1d2438 0%, #4a1f24 45%, #7d724f 100%);
}

@media (min-width: 700px) {
  .profile-banner { height: 150px; }
}

@media (min-width: 960px) {
  .profile-banner { height: 130px; }
}

.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-banner img.missing {
  display: none;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: -46px 0 0 22px;
  position: relative;
  z-index: 2;
  border: 4px solid var(--bg);
  overflow: hidden;
  background: #17140f url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f3ede2"><circle cx="12" cy="9" r="4"/><path d="M4 20c0-4 4-6 8-6s8 2 8 6"/></svg>') center/60% no-repeat;
}

@media (min-width: 700px) {
  .profile-avatar {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 28px;
  }
}

@media (min-width: 960px) {
  .profile-avatar {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 24px;
  }
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar img.missing {
  display: none;
}

.profile-body {
  padding: 18px 22px 24px;
}

@media (min-width: 700px) {
  .profile-body { padding: 20px 28px 32px; }
}

@media (min-width: 960px) {
  .profile-body { padding: 18px 24px 26px; }
}

.profile-body h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 27px;
  font-variation-settings: 'opsz' 90;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

@media (min-width: 700px) {
  .profile-body h2 { font-size: 30px; }
}

@media (min-width: 960px) {
  .profile-body h2 { font-size: 26px; }
}

.profile-bio {
  font-size: 14.5px;
  line-height: 1.75;
  letter-spacing: 0.012em;
  color: rgba(243, 237, 226, 0.72);
  text-wrap: pretty;
}

@media (min-width: 700px) {
  .profile-bio { font-size: 15.5px; line-height: 1.8; }
}

@media (min-width: 960px) {
  .profile-bio { font-size: 14.5px; }
}

.profile-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--faint);
}

@media (min-width: 700px) {
  .profile-socials { gap: 14px; margin-top: 22px; padding-top: 20px; }
}

.profile-social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(243, 237, 226, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 700px) {
  .profile-social { width: 42px; height: 42px; }
}

.profile-social svg {
  width: 18px;
  height: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .profile-social:hover {
    transform: translateY(-3px);
    color: var(--hover-color, var(--cream));
    border-color: var(--hover-color, var(--cream));
    box-shadow: 0 0 18px var(--hover-glow, rgba(243, 237, 226, 0.25));
  }
}

.profile-social[aria-label="Instagram"] {
  --hover-color: #e1306c;
  --hover-glow: rgba(225, 48, 108, 0.35);
}

.profile-social[aria-label="Medium"] {
  --hover-color: #1db954;
  --hover-glow: rgba(29, 185, 84, 0.35);
}

.profile-social[aria-label="Scriv"] {
  --hover-color: #e8a33d;
  --hover-glow: rgba(232, 163, 61, 0.35);
}

.profile-social[aria-label="Letterboxd"] {
  --hover-color: #40bcf4;
  --hover-glow: rgba(64, 188, 244, 0.35);
}

/* ---------- Article ---------- */

.article-view {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  background: var(--bg);
}

.article-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px calc(20px + var(--edge-r)) 18px calc(20px + var(--edge));
}

@media (min-width: 700px) {
  .article-nav { padding: 22px calc(32px + var(--edge-r)) 22px calc(32px + var(--edge)); }
}

@media (min-width: 960px) {
  .article-nav { padding: 26px calc(40px + var(--edge-r)) 26px calc(40px + var(--edge)); }
}

.article-view.no-cover .article-nav {
  position: static;
}

.btn-ghost.small {
  padding: 9px 18px;
  font-size: 13px;
}

.article-hero {
  position: relative;
}

.article-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(13, 12, 10, 0.5) 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

@media (min-width: 700px) {
  .article-hero::before { height: 160px; }
}

.article-banner {
  display: block;
  width: 100%;
  height: clamp(260px, 50vh, 420px);
  object-fit: cover;
  object-position: center 30%;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 1) 18%, #000 48%, transparent 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 1) 18%, #000 48%, transparent 100%);
}

.article-banner[hidden] {
  display: none;
}

@media (min-width: 700px) {
  .article-banner { height: clamp(340px, 56vh, 520px); }
}

@media (min-width: 960px) {
  .article-banner { height: clamp(360px, 62vh, 640px); }
}

.article-hero-meta {
  position: relative;
  z-index: 4;
  max-width: 780px;
  margin: -36px auto 0;
  padding: 0 calc(20px + var(--edge-r)) 0 calc(20px + var(--edge));
}

@media (min-width: 700px) {
  .article-hero-meta {
    margin-top: -55px;
    padding: 0 28px;
  }
}

@media (min-width: 960px) {
  .article-hero-meta { margin-top: -70px; }
}

.article-view.no-cover .article-hero-meta {
  margin-top: 32px;
}

@media (min-width: 700px) {
  .article-view.no-cover .article-hero-meta { margin-top: 40px; }
}

.article-view.no-cover .article-hero::before {
  display: none;
}

.article-view.no-cover .article-hero {
  overflow: hidden;
  padding-bottom: 10px;
}

.article-view.no-cover .article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--article-accent, linear-gradient(135deg, #1d2438, #10141f));
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 96%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 96%);
  pointer-events: none;
  z-index: 0;
}

.article-hero-cat {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 16px;
}

@media (min-width: 700px) {
  .article-hero-cat {
    font-size: 11px;
    letter-spacing: 0.18em;
    padding: 7px 15px;
    margin-bottom: 20px;
  }
}

.article-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(30px, 8vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  text-shadow: 0 2px 30px rgba(13, 12, 10, 0.8);
}

@media (min-width: 700px) {
  .article-hero h1 {
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
  }
}

.article-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (min-width: 700px) {
  .article-hero-row { gap: 20px; }
}

.article-hero-date {
  font-size: 13.5px;
  color: var(--muted);
}

@media (min-width: 700px) {
  .article-hero-date { font-size: 14.5px; }
}

.article-hero-read {
  font-size: 13.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 700px) {
  .article-hero-read { font-size: 14.5px; }
}

.article-hero-read::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.7;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px calc(20px + var(--edge-r)) 80px calc(20px + var(--edge));
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 11;
  font-weight: 400;
  font-size: clamp(17px, 4vw, 20px);
  line-height: 1.78;
  color: rgba(243, 237, 226, 0.9);
}

@media (min-width: 700px) {
  .article-body {
    padding: 52px 28px 100px;
    line-height: 1.82;
  }
}

@media (min-width: 960px) {
  .article-body {
    padding: 60px 28px 120px;
    line-height: 1.85;
  }
}

.article-body p {
  margin-bottom: 24px;
}

@media (min-width: 700px) {
  .article-body p { margin-bottom: 28px; }
}

.article-body hr {
  border: none;
  margin: 42px 0;
  text-align: center;
}

@media (min-width: 700px) {
  .article-body hr { margin: 52px 0; }
}

.article-body hr::after {
  content: '· · ·';
  font-size: 20px;
  letter-spacing: 0.5em;
  color: var(--muted);
}

@media (min-width: 700px) {
  .article-body hr::after { font-size: 22px; letter-spacing: 0.6em; }
}

.article-body h1,
.article-body h2,
.article-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.25;
  margin: 36px 0 16px;
  color: var(--cream);
}

@media (min-width: 700px) {
  .article-body h1,
  .article-body h2,
  .article-body h3 {
    margin: 44px 0 18px;
  }
}

.article-body h2 {
  font-size: 25px;
}

@media (min-width: 700px) {
  .article-body h2 { font-size: 30px; }
}

.article-body h3 {
  font-size: 21px;
}

@media (min-width: 700px) {
  .article-body h3 { font-size: 24px; }
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 24px 0;
  display: block;
}

@media (min-width: 700px) {
  .article-body img { border-radius: 12px; margin: 30px 0; }
}

.article-body figure {
  margin: 30px 0;
}

@media (min-width: 700px) {
  .article-body figure { margin: 38px 0; }
}

.article-body figure img {
  margin: 0;
}

.article-body figcaption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

@media (min-width: 700px) {
  .article-body figcaption { font-size: 13.5px; }
}

.article-body blockquote {
  border-left: 3px solid var(--spine);
  padding-left: 18px;
  margin: 26px 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 19px;
  color: var(--cream);
}

@media (min-width: 700px) {
  .article-body blockquote {
    padding-left: 22px;
    margin: 30px 0;
    font-size: 21px;
  }
}

.article-body a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body em {
  font-style: italic;
}

.article-loading {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}