@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* If you're reading this, hello from Louis :) */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cyan:   #00f5ff;
  --pink:   #ff2d78;
  --purple: #bf5fff;
  --gold:   #ffb703;
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.1);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 48px;
  background: #050510;
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  padding: 40px 20px;
  color: #fff;
  line-height: 1.6;
}

/* Animated Mesh Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(0,245,255,.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(255,45,120,.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(191,95,255,.05) 0%, transparent 70%);
  animation: bgPulse 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes bgPulse {
  0%   { opacity: .6; }
  100% { opacity: 1; }
}

/* Theme Variables */
.theme-home {
  --theme-color: var(--purple);
  --theme-rgb: 191, 95, 255;
}

.theme-marginalia {
  --theme-color: var(--pink);
  --theme-rgb: 255, 45, 118;
}

.theme-poetry {
  --theme-color: var(--cyan);
  --theme-rgb: 0, 245, 255;
}

.theme-about {
  --theme-color: var(--gold);
  --theme-rgb: 255, 183, 3;
}

/* Menu */
.main-nav {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  position: relative;
  z-index: 10;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.main-nav:hover {
  box-shadow: 0 0 24px rgba(var(--theme-rgb), 0.3);
  border-color: rgba(var(--theme-rgb), 0.4);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
}

.nav-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--theme-color);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(var(--theme-rgb), 0.4);
  letter-spacing: 2px;
  transition: transform 0.3s ease;
}

.nav-brand:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

/* Link Hover Colors for Menu */
.nav-links a.nav-home:hover {
  color: var(--purple);
  text-shadow: 0 0 12px rgba(191, 95, 255, 0.8);
}

.nav-links a.nav-about:hover {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 183, 3, 0.8);
}

.nav-links a.nav-marginalia:hover {
  color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 45, 118, 0.8);
}

.nav-links a.nav-poetry:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.8);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 20;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--theme-color);
  transition: 0.3s;
  box-shadow: 0 0 8px rgba(var(--theme-rgb), 0.4);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-container {
    padding: 16px 24px;
  }
  
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 0;
    margin-top: 12px;
    text-align: center;
    gap: 0;
  }

  .nav-links.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Back Link */
.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.back-link:hover {
  color: var(--theme-color);
  transform: scale(1.05);
  text-shadow: 0 0 12px rgba(var(--theme-rgb), 0.8);
}

/* Universal Section Title */
.section-title {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
.section-title h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 600;
  color: var(--theme-color);
  text-shadow: 0 0 12px rgba(var(--theme-rgb), 0.4);
  margin-bottom: 10px;
}
.section-title p {
  font-size: 16px;
  color: rgba(255,255,255,.45);
  font-style: italic;
}

/* Universal Title Badge */
.title-badge {
  display: inline-block;
  background: rgba(var(--theme-rgb), 0.07);
  border: 1px solid rgba(var(--theme-rgb), 0.18);
  color: var(--theme-color);
  font-size: 16px;
  letter-spacing: 3px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 920px;
  position: relative;
  z-index: 1;
}

/* Base Glass Card */
.glass-card, .glass-panel {
  position: relative;
  border-radius: 24px;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border);
  overflow: hidden;
  z-index: 1;
}

.glass-card {
  padding: 36px 32px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease;
  display: flex;
  flex-direction: column;
}
.glass-card:hover {
  transform: translateY(-8px) scale(1.01);
}

/* Animated Border */
.glass-card::before, .glass-panel::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0%,
    var(--glow1) 20%,
    var(--glow2) 40%,
    transparent 60%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 4s linear infinite;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.glass-card:hover::before { opacity: 1; }
.glass-panel::before { opacity: 0.3; }

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes spin {
  to { --angle: 360deg; }
}

/* Glow spot */
.glass-card::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow1) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  filter: blur(30px);
}
.glass-card:hover::after { opacity: .15; }

/* Card Theme Colors */
.card-cyan   { --glow1: var(--cyan);   --glow2: var(--purple); }
.card-pink   { --glow1: var(--pink);   --glow2: var(--purple); }
.card-purple { --glow1: var(--purple); --glow2: var(--cyan);   }

.card-cyan:hover   { box-shadow: 0 20px 60px rgba(0,245,255,.2),   0 0 0 1px rgba(0,245,255,.1); }
.card-pink:hover   { box-shadow: 0 20px 60px rgba(255,45,120,.2),  0 0 0 1px rgba(255,45,120,.1); }
.card-purple:hover { box-shadow: 0 20px 60px rgba(191,95,255,.2),  0 0 0 1px rgba(191,95,255,.1); }

/* Card Content */
.card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.card-cyan .card-label { color: var(--cyan); }
.card-pink .card-label { color: var(--pink); }
.card-purple .card-label { color: var(--purple); }

.card-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.25;
  position: relative; z-index: 1;
  flex-grow: 1;
}

.card-desc {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  margin-bottom: 28px;
  position: relative; z-index: 1;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .25s;
  position: relative; z-index: 1;
  width: max-content;
}
.card-cyan .card-btn { background: rgba(0,245,255,.12); color: var(--cyan); border: 1px solid rgba(0,245,255,.25); }
.card-pink .card-btn { background: rgba(255,45,120,.12); color: var(--pink); border: 1px solid rgba(255,45,120,.25); }
.card-purple .card-btn { background: rgba(191,95,255,.12); color: var(--purple); border: 1px solid rgba(191,95,255,.25); }

.card-btn:hover { filter: brightness(1.3); transform: scale(1.04); }
.card-btn svg { width: 16px; height: 16px; }

/* Content Pages (Marginalia and Poems) */
.glass-panel {
  width: 100%;
  max-width: 800px;
  padding: 48px;
}

.post-header {
  text-align: center;
  margin-bottom: 40px;
}
.post-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: rgba(255,255,255,.6);
}
.post-meta img {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--theme-color);
}

.post-content {
  font-size: 17px;
  color: rgba(255,255,255,.8);
  line-height: 1.8;
}
.post-content p { margin-bottom: 24px; }

/* List Styling */
.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.post-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* Custom Unordered List (Bullet Points) */
.post-content ul {
    list-style: none;
    padding-left: 0;
}

.post-content ul li {
    position: relative;
    padding-left: 28px;
}

.post-content ul li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--theme-color);
    font-size: 1.2em;
    top: -2px;
    text-shadow: 0 0 12px rgba(var(--theme-rgb), 0.4);
}

/* Custom Ordered List */
.post-content ol {
    padding-left: 24px;
}

.post-content ol li::marker {
    color: var(--theme-color);
    font-weight: 600;
}

/* Drop Cap */
.post-content p.drop-cap::first-letter {
  float: left;
  font-size: 3.8em;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 8px;
  font-weight: 700;
  color: var(--theme-color);
  text-shadow: 0 0 12px rgba(var(--theme-rgb), 0.4);
}
.post-content h2 { color: var(--theme-color); margin: 40px 0 20px; font-weight: 500; }

.post-content a {
  color: var(--theme-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--theme-rgb), 0.3);
  transition: border-color 0.3s;
  cursor: pointer;
}

.post-content a:hover {
  border-bottom-color: var(--theme-color);
}

.post-content blockquote {
  border-left: 3px solid var(--theme-color);
  padding-left: 20px;
  margin: 32px 0;
  font-style: italic;
  color: rgba(255,255,255,.6);
}
.post-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid rgba(255,255,255,.1);
}
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 32px 0;
  border-radius: 2px;
}
.video-container iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}
.post-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--theme-rgb), 0.4), transparent);
  margin: 48px 0;
}

/* Image Captions */
.post-content figure {
  margin: 32px 0;
  text-align: center;
}

.post-content figure img {
  margin: 0 0 12px 0;
}

.post-content figcaption {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  line-height: 1.4;
}

.poem-content {
  font-size: clamp(8px, 2.6vw, 16px);
  color: rgba(255,255,255,.85);
  line-height: 2;
  white-space: pre-line;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

/* Bio */
.author-bio {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.author-bio img {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid var(--theme-color);
}
.author-bio h3 { font-size: 20px; color: var(--theme-color); margin-bottom: 8px; }
.author-bio p { font-size: 14px; color: rgba(255,255,255,.6); }

/* Footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  margin-top: auto;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  font-size: 13px;
  width: 100%;
  max-width: 920px;
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.4);
  text-align: center;
}
footer strong { color: var(--theme-color); text-shadow: 0 0 12px rgba(var(--theme-rgb), 0.4); }
.footer-quote { color: rgba(255,255,255,.32); font-style: italic; font-size: 12px; }

@media (max-width: 768px) {
  .glass-panel { padding: 24px; }
  .author-bio { flex-direction: column; text-align: center; }
}