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

:root {
  --blood-red: #8B0000;
  --crimson: #DC143C;
  --bone-white: #F5F5DC;
  --ash-gray: #2B2B2B;
  --void-black: #0A0A0A;
  --ember: #FF4500;
  --shadow: rgba(0, 0, 0, 0.9);
  --ritual-purple: #4B0082;
  --decay-green: #1C3A1C;
}

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

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--void-black);
  color: var(--bone-white);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="8" fill="rgba(220,20,60,0.3)" stroke="%23DC143C" stroke-width="1"/></svg>'), auto;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at top left, rgba(139, 0, 0, 0.05), transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(75, 0, 130, 0.05), transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(220, 20, 60, 0.01) 2px,
      rgba(220, 20, 60, 0.01) 4px
    );
  pointer-events: none;
  z-index: 1;
  animation: pulseBackground 20s ease-in-out infinite;
}

@keyframes pulseBackground {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><text x="50" y="50" font-size="40" opacity="0.01" fill="%23DC143C" text-anchor="middle" transform="rotate(45 50 50)">⛧</text></svg>');
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

main, header, nav, section {
  position: relative;
  z-index: 2;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 
    0 0 10px var(--blood-red),
    0 0 20px rgba(139, 0, 0, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.9);
  position: relative;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--crimson);
  margin: 2rem 0;
  text-align: center;
  animation: titleFlicker 4s ease-in-out infinite;
  position: relative;
  display: inline-block;
}

h1::before {
  content: '⸸';
  position: absolute;
  left: -1.2em;
  color: var(--blood-red);
  animation: rotateSymbol 10s linear infinite;
}

h1::after {
  content: '⸸';
  position: absolute;
  right: -1.2em;
  color: var(--blood-red);
  animation: rotateSymbol 10s linear infinite reverse;
}

@keyframes rotateSymbol {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes titleFlicker {
  0%, 100% { 
    text-shadow: 
      0 0 10px var(--blood-red),
      0 0 20px rgba(139, 0, 0, 0.5),
      2px 2px 4px rgba(0, 0, 0, 0.9);
  }
  50% { 
    text-shadow: 
      0 0 20px var(--crimson),
      0 0 40px rgba(220, 20, 60, 0.7),
      2px 2px 4px rgba(0, 0, 0, 0.9);
  }
}

h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--bone-white);
  margin: 1.5rem 0;
  border-bottom: 2px solid var(--blood-red);
  padding-bottom: 0.5rem;
  position: relative;
}

h2::before {
  content: '☠';
  margin-right: 0.5em;
  color: var(--crimson);
  font-size: 0.9em;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--crimson);
  margin: 1rem 0;
}

p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 1rem 0;
  text-align: justify;
  font-weight: 300;
  letter-spacing: 0.03em;
}

em, i {
  color: var(--crimson);
  font-style: italic;
  font-weight: 400;
}

strong {
  color: var(--bone-white);
  font-weight: 600;
  text-shadow: 0 0 5px rgba(220, 20, 60, 0.3);
}

a {
  color: var(--crimson);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--blood-red), var(--ember));
  transition: width 0.4s ease;
}

a:hover {
  color: var(--bone-white);
  text-shadow: 0 0 10px var(--crimson);
}

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

nav {
  background: linear-gradient(135deg, rgba(43, 43, 43, 0.95), rgba(10, 10, 10, 0.98));
  padding: 1.5rem 2rem;
  border-bottom: 3px solid var(--blood-red);
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav a {
  margin: 0 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: inline-block;
  transition: all 0.3s ease;
}

nav a:hover {
  transform: translateY(-2px);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: rgba(43, 43, 43, 0.3);
  box-shadow: 
    0 0 50px rgba(139, 0, 0, 0.2),
    inset 0 0 100px rgba(0, 0, 0, 0.4);
  border-left: 1px solid rgba(139, 0, 0, 0.2);
  border-right: 1px solid rgba(139, 0, 0, 0.2);
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 3rem 0;
  position: relative;
}

header::before {
  content: '⛧';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15rem;
  color: var(--blood-red);
  opacity: 0.05;
  z-index: -1;
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.05; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.08; }
}

footer {
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  border-top: 2px solid var(--blood-red);
  font-size: 0.9rem;
  color: rgba(245, 245, 220, 0.6);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
}

blockquote {
  border-left: 4px solid var(--blood-red);
  padding-left: 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(245, 245, 220, 0.8);
  position: relative;
  background: rgba(139, 0, 0, 0.05);
  padding: 1.5rem 2rem;
}

blockquote::before {
  content: '"';
  position: absolute;
  left: 0.5rem;
  top: 0;
  font-size: 4rem;
  color: var(--blood-red);
  opacity: 0.3;
  font-family: Georgia, serif;
}

code, pre {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--blood-red);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: var(--ember);
  font-size: 0.9em;
}

pre {
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: inset 0 0 10px rgba(139, 0, 0, 0.3);
}

ul, ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

li {
  margin: 0.5rem 0;
  line-height: 1.8;
}

li::marker {
  color: var(--crimson);
  font-weight: bold;
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blood-red), transparent);
  margin: 3rem 0;
  position: relative;
}

hr::after {
  content: '⸸';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--void-black);
  padding: 0 1rem;
  color: var(--blood-red);
  font-size: 1.5rem;
}

::selection {
  background: var(--blood-red);
  color: var(--bone-white);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--ash-gray);
  border-left: 1px solid var(--blood-red);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blood-red), var(--ritual-purple));
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--crimson);
}

@media (max-width: 768px) {
  nav a {
    display: block;
    margin: 0.5rem 0;
  }
  
  main {
    padding: 2rem 1rem;
  }
  
  h1::before, h1::after {
    display: none;
  }
}

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

main > * {
  animation: fadeIn 0.8s ease-out backwards;
}

main > *:nth-child(1) { animation-delay: 0.1s; }
main > *:nth-child(2) { animation-delay: 0.2s; }
main > *:nth-child(3) { animation-delay: 0.3s; }
main > *:nth-child(4) { animation-delay: 0.4s; }
main > *:nth-child(5) { animation-delay: 0.5s; }
