/* ==========================================================================
   DORCHAMAS — shared stylesheet
   Used by: essays.html, about.html
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: #f0e4cf;
  background: linear-gradient(-45deg, #100b06, #1a120a, #0d0906, #1c150c);
  background-size: 400% 400%;
  animation: bgShift 20s ease infinite, fadeIn 1.2s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fine grain texture, present on every page */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: url('noise.png');
  opacity: 0.03;
  animation: noiseMove 1s steps(2) infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes noiseMove {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-10%, -10%); }
  100% { transform: translate(0, 0); }
}

/* ── Main menu only: photographic background ──────────────────────────── */
body.menu-page {
  background-image:
    linear-gradient(rgba(14, 9, 5, 0.74), rgba(14, 9, 5, 0.74)),
    url('solon.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  animation: fadeIn 1.2s ease; /* no gradient shift on the menu */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
}

/* Larger nav used as the menu's own primary links */
.menu-nav {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.menu-nav a {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: #f0e4cf;
  position: relative;
  padding-bottom: 4px;
  transition: letter-spacing 0.3s ease, color 0.3s ease;
}

.menu-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 1px;
  background: #d4a95f;
  transition: width 0.3s ease;
}

.menu-nav a:hover::after {
  width: 100%;
}

.menu-nav a:hover {
  letter-spacing: 4px;
  color: #e8c584;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 60px;
  width: 100%;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 3.25rem;
  letter-spacing: 3px;
  margin-bottom: 8px;
  opacity: 0;
  animation: titleFade 1.8s ease forwards;
}

@keyframes titleFade {
  to { opacity: 1; }
}

.quote {
  font-size: 1.15rem;
  max-width: 68ch;
  margin: 8px auto 24px auto;
  line-height: 1.6;
  opacity: 0.8;
}

.divider {
  width: 50%;
  height: 1px;
  background: #d4a95f;
  opacity: 0.4;
  margin: 24px auto 30px auto;
}

.section-divider {
  width: 50%;
  height: 1px;
  background: #d4a95f;
  opacity: 0.2;
  margin: 50px auto 50px auto;
  position: relative;
  z-index: 1;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  position: relative;
  z-index: 1;
}

nav a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  text-decoration: none;
  color: #f0e4cf;
  position: relative;
  padding-bottom: 4px;
  letter-spacing: 1px;
  transition: letter-spacing 0.3s ease, color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 1px;
  background: #d4a95f;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  letter-spacing: 2px;
  color: #e8c584;
}

nav a.active {
  opacity: 0.5;
  pointer-events: none;
}

nav a.active::after {
  width: 100%;
}

/* ── Card grid (essays) ─────────────────────────────────────────────────── */
.card-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 40px;
  padding: 0 20px 80px;
}

.entry-card {
  display: block;
  text-decoration: none;
  color: #f0e4cf;
  position: relative;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.entry-card:hover {
  transform: translateY(-6px);
  opacity: 0.85;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.75);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.entry-card:hover .card-image img {
  filter: brightness(0.9);
  transform: scale(1.02);
}

.card-image.placeholder {
  background: rgba(255, 255, 255, 0.02);
}

.card-image.placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-date {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.35;
  font-weight: 300;
}

.card-index {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 2px;
  opacity: 0.2;
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  letter-spacing: 1px;
  line-height: 1.45;
  opacity: 0.9;
}

.card-title-underline {
  height: 1px;
  background: #d4a95f;
  opacity: 0.3;
  margin-top: 12px;
  width: 0%;
  transition: width 0.4s ease;
}

.entry-card:hover .card-title-underline {
  width: 100%;
}

/* ── About page body ───────────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 20px 40px;
}

.about-body {
  font-size: 1rem;
  line-height: 2;
  font-weight: 300;
  opacity: 0.85;
}

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

.about-body p:last-child {
  margin-bottom: 0;
}

.about-body .emphasis {
  font-weight: 400;
  letter-spacing: 1.5px;
}

.thin-divider {
  width: 40%;
  height: 1px;
  background: #d4a95f;
  opacity: 0.18;
  margin: 48px auto 40px auto;
}

/* ── Social row (placeholders) ─────────────────────────────────────────── */
.social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-3px);
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: #e8c584;
}

.email-line {
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  font-weight: 300;
  opacity: 0.9;
  color: #f0e4cf;
  text-shadow:
    0 0 8px rgba(232, 197, 132, 0.65),
    0 0 20px rgba(212, 169, 95, 0.3),
    0 0 40px rgba(212, 169, 95, 0.12);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(232, 197, 132, 0.65),
      0 0 20px rgba(212, 169, 95, 0.3),
      0 0 40px rgba(212, 169, 95, 0.12);
  }
  50% {
    text-shadow:
      0 0 12px rgba(232, 197, 132, 0.95),
      0 0 30px rgba(212, 169, 95, 0.45),
      0 0 60px rgba(212, 169, 95, 0.18);
  }
}

.email-line a {
  color: #e8c584;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.email-line a:hover {
  opacity: 0.75;
}

/* ── Cursor: a quiet ring that eases toward the pointer, and a fixed
   center point. No trail, no color burst — deliberate, unhurried. ────── */
.cursor-ring {
  position: fixed;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(232, 197, 132, 0.55);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.cursor-dot {
  position: fixed;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(232, 197, 132, 0.9);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.cursor-ring.is-active {
  width: 40px;
  height: 40px;
  border-color: rgba(232, 197, 132, 0.9);
}

/* Hide the custom cursor on touch devices, where it can't track anyway */
@media (hover: none) and (pointer: coarse) {
  .cursor-ring,
  .cursor-dot {
    display: none;
  }
  * {
    cursor: auto;
  }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .menu-nav {
    gap: 28px;
  }
}
