@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Cormorant:ital,wght@0,300;0,400;1,300;1,400&display=swap');

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

:root {
  --black: #000000;
  --white: #f5f2ed;
  --dim: rgba(245, 242, 237, 0.45);
  --dimmer: rgba(245, 242, 237, 0.22);
  --rule: rgba(245, 242, 237, 0.12);
  --accent: rgba(245, 242, 237, 0.06);
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--black);
  background-image: url('images/backgroundleo.png');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--white);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.65) 40%,
    rgba(0,0,0,0.80) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

/* ── Navigation ── */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.1s;
}

nav a {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--white);
}

nav .site-name {
  font-weight: 400;
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
}

/* ── Index page ── */

.index-header {
  margin-bottom: 72px;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.25s;
}

.index-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.6rem;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 18px;
  line-height: 1.1;
}

.index-header p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--dim);
  font-style: italic;
  font-weight: 300;
  max-width: 480px;
}

/* ── Essay list ── */

.essay-list {
  list-style: none;
}

.essay-list li {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.essay-list li:nth-child(1)  { animation-delay: 0.40s; }
.essay-list li:nth-child(2)  { animation-delay: 0.48s; }
.essay-list li:nth-child(3)  { animation-delay: 0.56s; }
.essay-list li:nth-child(4)  { animation-delay: 0.64s; }
.essay-list li:nth-child(5)  { animation-delay: 0.72s; }
.essay-list li:nth-child(6)  { animation-delay: 0.80s; }
.essay-list li:nth-child(7)  { animation-delay: 0.88s; }
.essay-list li:nth-child(8)  { animation-delay: 0.96s; }
.essay-list li:nth-child(9)  { animation-delay: 1.04s; }
.essay-list li:nth-child(10) { animation-delay: 1.12s; }

.essay-list li + li {
  border-top: 1px solid var(--rule);
}

.essay-list a {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: 28px 0;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.essay-list a:hover {
  padding-left: 8px;
}

.essay-list a:hover .essay-title {
  color: var(--white);
}

.essay-list a:hover .essay-number {
  color: var(--dim);
}

.essay-number {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--dimmer);
  text-transform: uppercase;
  min-width: 32px;
  padding-top: 4px;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.essay-meta {
  flex: 1;
}

.essay-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: rgba(245, 242, 237, 0.88);
  line-height: 1.2;
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.essay-subtitle {
  font-size: 0.82rem;
  color: var(--dimmer);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ── Essay page ── */

.essay-header {
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.25s;
}

.essay-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dimmer);
  margin-bottom: 24px;
  display: block;
}

.essay-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.8rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

.essay-header .deck {
  font-size: 1.05rem;
  color: var(--dim);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 28px;
  line-height: 1.5;
}

.essay-header .byline {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.essay-divider {
  width: 40px;
  height: 1px;
  background: var(--rule);
  margin: 40px 0;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.35s;
}

/* ── Essay body ── */

.essay-body {
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.45s;
}

.essay-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(245, 242, 237, 0.82);
  margin-bottom: 1.6em;
  font-weight: 300;
}

.essay-body p:first-child::first-letter {
  font-size: 3.4em;
  font-weight: 400;
  float: left;
  line-height: 0.82;
  margin: 0.06em 0.12em 0 0;
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
}

.essay-body blockquote {
  border-left: 1px solid var(--rule);
  margin: 2.4em 0;
  padding: 0 0 0 28px;
}

.essay-body blockquote p {
  font-style: italic;
  color: var(--dim);
  font-size: 1rem;
  margin-bottom: 0.5em;
}

.essay-body blockquote cite,
.essay-body blockquote p:last-child {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--dimmer);
  font-style: normal;
  text-transform: uppercase;
}

.essay-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--white);
  margin: 2.4em 0 0.9em;
}

/* ── Essay footer ── */

.essay-footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.6s;
}

.essay-footer a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmer);
  text-decoration: none;
  transition: color 0.3s ease;
}

.essay-footer a:hover {
  color: var(--white);
}

/* ── Animations ── */

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

/* ── Responsive ── */

@media (max-width: 600px) {
  .container {
    padding: 56px 28px 80px;
  }

  .index-header h1 {
    font-size: 2rem;
  }

  .essay-header h1 {
    font-size: 2.1rem;
  }

  .essay-list a {
    gap: 20px;
  }

  nav {
    margin-bottom: 56px;
  }
}
