:root {
  --bg-primary: #121212;
  --bg-secondary: #1A1A1A;
  --bg-tertiary: #242424;
  --accent-gold: #D4AF37;
  --accent-gold-light: #E8C37D;
  --text-main: #F5F5F5;
  --text-muted: #A0A0A0;
  --border-subtle: rgba(212, 175, 55, 0.2);
  
  --font-heading: 'Didot', 'Playfair Display', 'Times New Roman', serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  
  --spacing-sm: 1rem;
  --spacing-md: 2.5rem;
  --spacing-lg: 5rem;
  
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  letter-spacing: 1px;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--accent-gold-light);
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 300;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--text-main);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: var(--transition-smooth);
}

header.scrolled {
  padding: 0.5rem 0;
  background: rgba(18, 18, 18, 0.98);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.logo img {
  height: 60px;
  width: auto;
}

/* Main Content */
main {
  padding-top: 150px;
  padding-bottom: var(--spacing-lg);
}

.hero {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

/* Images & Figures */
figure {
  margin: var(--spacing-md) 0;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

figure::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 1px solid var(--border-subtle);
  pointer-events: none;
}

img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s ease;
}

figure:hover img {
  transform: scale(1.03);
}

figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(18,18,18,0.95), transparent);
  color: var(--accent-gold);
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-align: center;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-md) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

th, td {
  padding: 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
  background: var(--bg-tertiary);
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

tr:hover td {
  background: rgba(212, 175, 55, 0.03);
}

/* Lists */
ul, ol {
  margin: 1.5rem 0 1.5rem 2rem;
  color: var(--text-muted);
  font-weight: 300;
}

li {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

ul li::marker {
  color: var(--accent-gold);
}

/* Asides */
aside {
  background: var(--bg-secondary);
  border-left: 2px solid var(--accent-gold);
  padding: 2rem;
  margin: var(--spacing-md) 0;
  position: relative;
}

aside::before {
  content: '✦';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--border-subtle);
  font-size: 2rem;
}

aside p {
  margin: 0;
  color: var(--text-main);
  font-style: italic;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--spacing-md) 0;
  text-align: center;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  
  table, thead, tbody, th, td, tr {
    display: block;
  }
  th {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  tr { border-bottom: 1px solid var(--border-subtle); }
  td {
    border: none;
    position: relative;
    padding-left: 50%;
  }
  td::before {
    position: absolute;
    top: 1.5rem;
    left: 1rem;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    color: var(--accent-gold);
    font-family: var(--font-heading);
  }
}