/* CSS Reset and Variables */
*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Font Loading - Simplified and Guaranteed */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  src: local('EB Garamond Regular'), local('EBGaramond-Regular'),
       url('https://fonts.gstatic.com/s/ebgaramond/v14/SlGDmQSNjdsmc35Joj_cPKtj.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Simplified font system - guaranteed to work */
  --font-body: 'EB Garamond', serif;
  --font-headings: 'EB Garamond', serif;
  --font-accent: 'EB Garamond', serif;
  --line-height: calc(5 / 4);
  --letter-spacing: 0.4px;
  --text-indent: 0.5em;

  /* Clean black color palette */
  --c-bg: #1e2124;
  --c-bg-dark: #0f0f0f;
  --c-fg: #ffffff;
  --c-muted: #ddddcc;
  --c-dim: #888877;
  --c-dimmer: #444433;
  --c-accent: #3a5f7a;     /* Muted teal/lead blue */
  --c-highlight: #8b6b47;  /* Antique gold/sepia */

  /* Layout variables */
  --layout-width: 72em;
  --gutter: calc(1em * 2 / 2 * var(--line-height));
  --border-style: dotted;
}

/* Basic Styles */
::selection {
  background: var(--c-accent);
  color: var(--c-bg);
}

/* Esoteric Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 20% 20%, var(--c-accent) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, var(--c-highlight) 1px, transparent 1px),
    radial-gradient(circle at 50% 80%, var(--c-accent) 1px, transparent 1px);
  background-size: 150px 150px, 120px 120px, 180px 180px;
  animation: esoteric-constellation 120s linear infinite;
  z-index: -1;
}

@keyframes esoteric-constellation {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 150px 150px, 120px 120px, 180px 180px; }
}

html,
body {
  height: 100%;
  scrollbar-color: var(--c-dimmer) var(--c-bg-dark);
  scrollbar-width: thin;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.6vw, 1.6rem);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  text-indent: var(--text-indent);
  background:
    radial-gradient(circle at 25% 25%, rgba(221,204,170,0.02) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255,215,0,0.01) 1px, transparent 1px);
  background-color: var(--c-bg);
  background-size: 20px 20px, 15px 15px;
  color: var(--c-muted);
  overflow-x: hidden;
}

/* Layout Grid System */
.layout {
  --layout-width: 72em;
  --gutter: calc(1em * 2 / 2 * var(--line-height));
  pointer-events: none;
  position: relative;
  z-index: 1;
  padding-inline: var(--gutter);
  max-width: var(--layout-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns:
    calc(1em * 6 * var(--line-height)) 6fr calc(1em * 2 * var(--line-height))
    3fr calc(1em * 2 * var(--line-height));
  grid-auto-rows: min-content;
  grid-auto-flow: dense;
  column-gap: var(--gutter);
  row-gap: calc(1em * 3 * var(--line-height));

  hr {
    --h: 3px;
    border: none;
    margin-block-start: calc(1em * 1 * var(--line-height));
    border-block-end: var(--h) var(--c-dimmer) var(--border-style);
  }
}

/* Header with Image */
.layout > header {
  grid-column: 1 / span 4;
  grid-row: 1 / span 1;
  position: relative;
  padding: 0;
  margin-bottom: calc(1em * 2 * var(--line-height));

  .header-image-container {
    pointer-events: auto;
    position: relative;
    padding: calc(1em * 0.8);
    background: var(--c-bg);
    border: 3px ridge var(--c-dimmer);
    border-radius: 8px;
    box-shadow:
      inset 2px 2px 8px rgba(0,0,0,0.4),
      inset -2px -2px 6px rgba(255,255,255,0.05),
      0 6px 20px rgba(0,0,0,0.4),
      0 0 0 2px rgba(0,0,0,0.8);

    &::before {
      content: '';
      position: absolute;
      top: -6px;
      left: -6px;
      right: -6px;
      bottom: -6px;
      background: linear-gradient(135deg, var(--c-bg-dark) 0%, rgba(30,33,36,0.5) 50%, var(--c-bg-dark) 100%);
      border-radius: 12px;
      z-index: -1;
      box-shadow:
        4px 4px 12px rgba(0,0,0,0.6),
        -2px -2px 8px rgba(255,255,255,0.1);
    }

    &::after {
      content: '';
      position: absolute;
      top: 4px;
      left: 4px;
      right: 4px;
      bottom: 4px;
      background: linear-gradient(145deg,
        rgba(255,255,255,0.03) 0%,
        transparent 50%,
        rgba(0,0,0,0.02) 100%);
      border-radius: 4px;
      pointer-events: none;
    }

    .header-image {
      display: block;
      width: 100%;
      height: auto;
      object-fit: contain; /* Show full image */
      object-position: center;
      border-radius: 2px;
      box-shadow:
        inset 4px 4px 8px rgba(0,0,0,0.3),
        inset -2px -2px 6px rgba(255,255,255,0.1);
      background: var(--c-bg-dark);
      padding: 8px;
    }
  }

  .header-controls {
    position: absolute;
    top: calc(1em * 1.5);
    right: calc(1em * 1.5);
    display: flex;
    gap: calc(1em * 0.6);
    pointer-events: auto;
    z-index: 20;
    /* 3D depth effect for button tray */
    background: linear-gradient(135deg,
      rgba(0,0,0,0.6) 0%,
      rgba(30,33,36,0.3) 100%);
    padding: calc(1em * 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow:
      inset 2px 2px 4px rgba(0,0,0,0.4),
      0 4px 8px rgba(0,0,0,0.4);

    .control-btn {
      --size: calc(1em * 2.8);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: var(--size);
      height: var(--size);
      background: linear-gradient(145deg, var(--c-bg-dark), rgba(0,0,0,0.9));
      border: 2px outset var(--c-dimmer);
      border-radius: 50%;
      color: var(--c-muted);
      position: relative;
      box-shadow:
        inset -3px -3px 6px rgba(0,0,0,0.4),
        inset 3px 3px 6px rgba(255,255,255,0.1),
        0 3px 6px rgba(0,0,0,0.3);
      transition: all 0.2s ease;
      cursor: url('assets/cursors/glove-link.cur'), pointer;
      font-size: 0.8em;

      /* Label always visible on desktop, hidden on mobile */
      .btn-label {
        font-size: 0.6rem;
        font-weight: bold;
        margin-top: 0.2rem;
        pointer-events: none;
        user-select: none;
      }

      &:hover {
        background: linear-gradient(145deg, var(--c-accent), rgba(58,95,122,0.8));
        border-color: var(--c-highlight);
        transform: scale(1.05) translateY(-1px);
        box-shadow:
          inset -4px -4px 8px rgba(0,0,0,0.5),
          inset 4px 4px 8px rgba(255,255,255,0.2),
          0 4px 8px rgba(58,95,122,0.4);
      }

      &:active {
        box-shadow:
          inset 3px 3px 6px rgba(0,0,0,0.5),
          inset -3px -3px 6px rgba(255,255,255,0.1);
        transform: scale(1.02) translateY(0);
      }

      i {
        font-size: calc(var(--size) * 0.4);
        font-weight: bold;
      }
    }
  }
}

/* Mobile responsive header */
@media (max-width: 960px) {
  .layout > header {
    .header-controls {
      .control-btn {
        --size: calc(1em * 2.5);
      }
    }
  }
}

@media (max-width: 720px) {
  .layout > header {
    grid-column: 1 / span 4;

    .header-image-container .header-image {
      width: 100%;
      height: auto;
      max-width: 100%;
    }

    .header-controls {
      top: calc(1em * 0.8);
      right: calc(1em * 0.8);
      gap: calc(1em * 0.4);

      .control-btn {
        --size: calc(1em * 2.2);
        border-width: 1px;

        &:hover {
          transform: scale(1.03) translateY(-0.5px);
        }
      }
    }
  }
}

/* Right Sidebar */
.layout > .sidebar-right {
  grid-column: 4 / span 1;
  position: sticky;
  top: calc(1em * 2 * var(--line-height));

  .nav-container {
    pointer-events: auto;

    h2 {
      color: var(--c-dim);
      font-family: var(--font-accent);
      --s: 0.875;
      font-size: calc(1em * var(--s));
      line-height: calc(1em * var(--line-height) / var(--s));
      font-weight: inherit;
      margin-block-end: calc(1em * 1 * var(--line-height) / var(--s));
    }

    ul {
      list-style-type: none;

      li {
        position: relative;
        padding-inline-start: calc(1em * 5 / 4);
        margin-block-end: calc(1em * 0.5);

        &:before {
          content: "ꔻ";
          font-family: Georgia, serif;
          position: absolute;
          top: 0;
          left: 0;
          color: var(--c-dim);
          font-size: 0.9em;
          line-height: 1;
          transform: rotate(-15deg);
          filter: opacity(0.8);
        }
      }

      a {
        color: inherit;
        text-decoration-line: underline;
        text-decoration-color: var(--c-dimmer);
        text-decoration-thickness: calc(1em / 6);

        &:hover {
          color: var(--c-fg);
        }

        &[href^="http"]:after {
          content: " ⧉";
        }
      }
    }

    /* Special navigation styling */
    .journal-nav {
      li {
        &:before {
          content: " ⁄";
          margin-inline: 0.25em 0.5em;
        }
        &:first-child:before {
          content: "✯";
          position: static;
          margin-inline: 0 0.25em;
        }
        a:before {
          content: "'";
        }
        &:not(:first-child) span {
          display: none;
        }
      }
    }
  }

  .widget-controls {
    pointer-events: auto;
    margin-block-start: calc(1em * 4 * var(--line-height));

    .control-btn {
      --size: calc(1em * 2.8);
      display: block;
      width: var(--size);
      height: var(--size);
      background: linear-gradient(145deg, var(--c-bg-dark), rgba(0,0,0,0.9));
      border: 2px outset var(--c-dimmer);
      border-radius: 50%;
      margin-block-end: calc(1em * 0.75);
      color: var(--c-muted);
      font-weight: bold;
      box-shadow:
        inset -3px -3px 6px rgba(0,0,0,0.4),
        inset 3px 3px 6px rgba(255,255,255,0.1),
        0 3px 6px rgba(0,0,0,0.3);
      transition: all 0.2s ease;

      &:hover {
        background: linear-gradient(145deg, var(--c-accent), rgba(85,68,255,0.8));
        border-color: var(--c-highlight);
        transform: scale(1.05) translateY(-1px);
        box-shadow:
          inset -4px -4px 8px rgba(0,0,0,0.5),
          inset 4px 4px 8px rgba(255,255,255,0.2),
          0 4px 8px rgba(85,68,255,0.4);
      }

      &:active {
        box-shadow:
          inset 3px 3px 6px rgba(0,0,0,0.5),
          inset -3px -3px 6px rgba(255,255,255,0.1);
        transform: scale(1.02) translateY(0);
      }

      i {
        font-size: calc(var(--size) * 0.4);
      }
    }
  }
}

/* Main Content */
.layout > .content-main {
  grid-column: 2 / span 1;
  pointer-events: auto;

  .intro-section {
    margin-block-end: calc(1em * 3 * var(--line-height));

    .content-wrapper {
      display: grid;
      grid-template-columns: calc(1em * 4) 1fr;
      gap: calc(1em * 2);
      align-items: flex-start;

      .symbol-logo {
        img {
          width: calc(1em * 3);
          height: calc(1em * 3);
          object-fit: contain;
          filter: brightness(0.8) contrast(1.1);
          opacity: 0.85;
        }
      }

      .text-content {
        h1 {
          font-family: var(--font-accent);
          --s: 1.5;
          font-size: calc(1em * var(--s));
          line-height: calc(1em * var(--line-height) / var(--s));
          color: var(--c-fg);
          margin-block-end: calc(1em * 1 * var(--line-height));
          text-transform: uppercase;
          letter-spacing: 1px;
        }

        .intro-text {
          --s: 1.1;
          font-size: calc(1em * var(--s));
          line-height: calc(1em * var(--line-height) / var(--s));
          margin-block-end: calc(1em * 1.5 * var(--line-height));

          /* 1930s dropcap styling */
          &:first-letter {
            font-family: var(--font-accent);
            font-size: 3.5em;
            line-height: 0.8em;
            float: left;
            margin-right: 0.2em;
            margin-bottom: 0.1em;
            color: var(--c-fg);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            background: linear-gradient(135deg, var(--c-fg) 0%, var(--c-accent) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
          }

          &:first-line {
            letter-spacing: 0.2px;
            font-weight: 500;
          }

          /* First paragraph (introduction with "Here") should NOT have dropcap */
          &:first-child:first-letter {
            font-size: 1em;
            line-height: inherit;
            float: none;
            margin-right: 0.1em;
            margin-bottom: 0;
            text-shadow: none;
            background: none;
            -webkit-background-clip: unset;
            -webkit-text-fill-color: unset;
            background-clip: unset;
          }

          em {
            color: var(--c-accent);
            font-style: normal;
          }
        }
      }
    }
  }

  .featured-section {
    margin-block-end: calc(1em * 4 * var(--line-height));

    .featured-media {
      iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border: 1px solid var(--c-dimmer);
        border-radius: 4px;
      }
    }
  }

  .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(1em * 2 * var(--line-height));
    margin-block-end: calc(1em * 4 * var(--line-height));

    .grid-item {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--c-dimmer);
      border-radius: 8px;
      overflow: hidden;
      transition: all 0.3s ease;

      &:hover {
        border-color: var(--c-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(85, 68, 255, 0.1);
      }

      a {
        display: block;
        text-decoration: none;
        color: inherit;
      }

      img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
      }

      h3 {
        padding: calc(1em * 1);
        font-size: calc(1em * 1.2);
        color: var(--c-fg);
        margin: 0;
      }

      p {
        padding: 0 calc(1em * 1) calc(1em * 1);
        color: var(--c-dim);
        font-size: 0.9em;
        margin: 0;
      }
    }
  }

  .music-preview {
    h2 {
      --s: 1.25;
      font-family: var(--font-accent);
      font-size: calc(1em * var(--s));
      line-height: calc(1em * var(--line-height) / var(--s));
      color: var(--c-fg);
      margin-block-end: calc(1em * 1 * var(--line-height));
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .section-intro {
      color: var(--c-dim);
      margin-block-end: calc(1em * 2 * var(--line-height));
      font-size: 0.95em;
    }

    .music-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: calc(1em * 2 * var(--line-height));

      .music-item {
        display: flex;
        gap: calc(1em * 1.5);
        align-items: center;

        .album-art {
          flex-shrink: 0;

          .album-placeholder {
            width: calc(1em * 4 * var(--line-height));
            height: calc(1em * 4 * var(--line-height));
            background: linear-gradient(45deg, var(--c-bg-dark), var(--c-dimmer));
            border: 1px solid var(--c-dimmer);
            border-radius: 4px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: calc(1em * 0.5);

            .album-title {
              font-size: 0.7em;
              color: var(--c-muted);
              margin-block-end: 0.25em;
            }

            .artist {
              font-size: 0.6em;
              color: var(--c-dim);
            }
          }
        }

        .music-info {
          h4 {
            color: var(--c-fg);
            margin-block-end: 0.5em;
          }

          p {
            color: var(--c-dim);
            font-size: 0.9em;
            margin-block-end: 1em;
          }

          .listen-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5em;
            padding: 0.6em 1.25em;
            background: linear-gradient(145deg, var(--c-accent), rgba(85,68,255,0.8));
            color: var(--c-bg);
            text-decoration: none;
            border: 2px outset var(--c-accent);
            border-radius: 25px;
            font-size: 0.9em;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow:
              inset -2px -2px 4px rgba(0,0,0,0.3),
              inset 2px 2px 4px rgba(255,255,255,0.1),
              0 3px 6px rgba(0,0,0,0.2);
            transition: all 0.2s ease;
            cursor: url('assets/cursors/glove-link.cur'), pointer;

            &:hover {
              background: linear-gradient(145deg, var(--c-highlight), rgba(255,107,107,0.8));
              border-color: var(--c-highlight);
              box-shadow:
                inset -3px -3px 6px rgba(0,0,0,0.4),
                inset 3px 3px 6px rgba(255,255,255,0.2),
                0 4px 8px rgba(255,107,107,0.4);
              transform: translateY(-1px);
            }

            &:active {
              box-shadow:
                inset 2px 2px 4px rgba(0,0,0,0.4),
                inset -2px -2px 4px rgba(255,255,255,0.1);
              transform: translateY(0);
            }

            i {
              font-size: 1em;
            }
          }

          .external-link {
            color: #2ebd35;
            text-decoration: none;
            transition: all 0.3s ease;

            &:hover {
              color: #4ade80;
              transform: scale(1.05);
            }
          }
        }
      }
    }
  }
}

/* Links Section */
.layout > main .content-section#links .section-content .links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(1em * 1.5);
}

.layout > main .content-section#links .section-content .link-card {
  display: flex;
  align-items: center;
  gap: calc(1em * 1);
  padding: calc(1em * 1.25);
  background: rgba(45, 133, 45, 0.02);
  border: 1px solid rgba(45, 133, 45, 0.1);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;

  &:hover {
    background: rgba(45, 133, 45, 0.05);
    border-color: rgba(45, 133, 45, 0.2);
    transform: translateY(-2px);
  }

  .link-icon {
    flex-shrink: 0;
    width: calc(1em * 2);
    height: calc(1em * 2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(1em * 1.5);
    color: #2d852d;
  }

  .link-info {
    h4 {
      color: var(--c-fg);
      margin-block-end: 0.25em;
      font-size: 1.1em;
    }

    p {
      color: var(--c-dim);
      font-size: 0.9em;
      margin: 0;
    }
  }
}

/* Contact Section */
.layout > main .content-section#contact .section-content .contact-info {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.layout > main .content-section#contact .section-content .contact-links {
  display: flex;
  justify-content: center;
  gap: calc(1em * 2);
  flex-wrap: wrap;
  margin-top: calc(1em * 1.5);
}

.layout > main .content-section#contact .section-content .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  background: rgba(255, 215, 0, 0.1);
  color: var(--c-fg);
  text-decoration: none;
  border-radius: 25px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  font-size: 0.95em;
  transition: all 0.3s ease;

  &:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-1px);
  }
}

/* Footer */
.layout > footer {
  grid-column: 1 / span 4;
  background: var(--c-bg-dark);
  border-top: 1px solid var(--c-dimmer);
  padding: calc(1em * 2);
  margin-top: calc(1em * 4);

  .footer-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;

    h3 {
      color: var(--c-fg);
      font-size: calc(1em * 1.2);
      margin-bottom: calc(1em * 1.5);
      text-transform: uppercase;
      letter-spacing: 1px;
      font-family: var(--font-accent);
    }

    .contact-info {
      p {
        color: var(--c-dim);
        margin-bottom: calc(1em * 1.5);
        font-size: 0.95em;
      }

      .contact-links {
        display: flex;
        justify-content: center;
        gap: calc(1em * 1.5);
        flex-wrap: wrap;
        margin-bottom: calc(1em * 2);

        .contact-link {
          display: inline-flex;
          align-items: center;
          gap: 0.5em;
          padding: 0.8em 1.5em;
          background: rgba(255, 215, 0, 0.1);
          color: var(--c-fg);
          text-decoration: none;
          border-radius: 25px;
          border: 1px solid rgba(255, 215, 0, 0.2);
          font-size: 0.95em;
          font-weight: 500;
          transition: all 0.3s ease;
          min-width: 140px;
          justify-content: center;

          &:hover {
            background: rgba(255, 215, 0, 0.15);
            border-color: rgba(255, 215, 0, 0.3);
            transform: translateY(-1px);
            color: var(--c-fg);
          }

          i {
            font-size: 1.1em;
          }
        }
      }
    }

    p:last-child {
      color: var(--c-dim);
      font-size: 0.85em;
      margin-top: calc(1em * 1.5);
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      padding-top: calc(1em * 1);
      text-align: center;
    }
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;

  &.hidden {
    opacity: 0;
    pointer-events: none;
  }

  &:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
  }

  .modal-content {
    background: var(--c-bg-dark);
    border: 1px solid var(--c-dimmer);
    border-radius: 8px;
    padding: calc(1em * 2);
    max-width: 500px;
    width: 90%;

    #search-input {
      width: 100%;
      padding: 0.75em;
      background: var(--c-bg);
      border: 1px solid var(--c-dimmer);
      border-radius: 4px;
      color: var(--c-muted);
      font-size: 1em;
      margin-bottom: 1em;

      &:focus {
        outline: none;
        border-color: var(--c-accent);
      }
    }

    #search-results {
      max-height: 300px;
      overflow-y: auto;
    }
  }
}

/* Mobile-first responsive design with smooth navigation */
@media (max-width: 1024px) {
  .layout > .sidebar-right {
    .nav-container {
      font-size: 0.9em;
    }
  }
}

@media (max-width: 960px) {
  /* Remove top spacing */
  body {
    margin-top: 0;
    padding-top: 0;
  }

  /* Ensure background texture remains visible on mobile */
  body::before {
    background-size: 120px 120px, 100px 100px, 140px 140px;
  }

  body {
    background-size: 18px 18px, 12px 12px;
  }

  /* Switch to mobile layout */
  .layout {
    display: flex;
    flex-direction: column;
    row-gap: calc(1em * 1.5 * var(--line-height));
    padding-inline: 0;
    margin-inline: 0;
    padding-top: 0;
    margin-top: 0;

    /* Mobile header - absolutely at the top */
    > header {
      position: sticky;
      top: 0;
      z-index: 50;
      margin: 0 0 calc(1em * 4) 0;
      padding-top: 0;
      order: -1;
      padding-bottom: calc(1em * 2);

      .header-image-container {
        padding: calc(1em * 0.4);
        margin: 0;
        border-radius: 0;

        .header-image {
          max-width: 100%;
          height: auto;
          border-radius: 0;
        }
      }

  .header-controls {
    position: fixed;
    top: calc(1em * 1);
    right: calc(1em * 1);
    display: flex;
    flex-direction: column;
    gap: calc(1em * 0.3);
    z-index: 60;
    border-radius: 16px;
    padding: calc(1em * 0.3);
    background: rgba(30,33,36,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
      inset 2px 2px 4px rgba(0,0,0,0.4),
      0 4px 12px rgba(0,0,0,0.6);

  .control-btn {
    --size: calc(1em * 3.2);
    min-width: var(--size);
    min-height: var(--size);
    border-width: 2px;
    transition: all 0.15s ease;
    border-radius: 50%;

    i {
      font-size: calc(var(--size) * 0.35);
    }

    .btn-label {
      display: none;
    }

    &:active {
      transform: scale(0.95);
    }
  }
      }
    }

    /* Mobile content area */
    > .content-main {
      order: 2;
      padding-inline: calc(1em * 0.75);

      .intro-section {
        margin-bottom: calc(1em * 2);

        .content-wrapper {
          grid-template-columns: calc(1em * 3) 1fr;
          gap: calc(1em * 1);
          align-items: start;

          .symbol-logo img {
            width: calc(1em * 2.8);
            height: calc(1em * 2.8);
          }

          .text-content {
            h1 {
              font-size: calc(1em * 1.3);
              line-height: 1.3;
              margin-bottom: calc(1em * 0.8);
            }

            .intro-text {
              font-size: calc(1em * 1);
              line-height: var(--line-height);
              margin-block-end: calc(1em * 1);
              text-indent: 0;
              text-align: justify;
              hyphens: auto;
              -webkit-hyphens: auto;
              -moz-hyphens: auto;
            }
          }
        }
      }

      /* Mobile section headers - improved touch targets */
      .section-header {
        display: flex;
        align-items: center;
        gap: calc(1em * 0.8);
        margin-bottom: calc(1em * 1.5);

        .section-title {
          flex: 1;
          font-size: calc(1em * 1.2);
          text-align: left;
        }

        .section-toggle {
          min-width: 120px;
          min-height: 48px;
          font-size: 0.85em;
          white-space: nowrap;
        }
      }

      .content-section {
        margin-block-end: calc(1em * 2);
      }

      .music-preview {
        margin-bottom: calc(1em * 3);

        h2 {
          font-size: calc(1em * 1.3);
        }

        .music-grid {
          grid-template-columns: 1fr;
          gap: calc(1em * 1.5);

          .music-item {
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: calc(1em * 1);

            .album-art {
              margin-bottom: calc(1em * 0.8);

              .album-placeholder {
                width: calc(1em * 4.5);
                height: calc(1em * 4.5);
              }
            }

            .music-info {
              h4 {
                font-size: 1.1em;
              }

              p {
                font-size: 0.9em;
              }

              .listen-btn {
                min-width: 140px;
                padding: 0.8em 1.2em;
                font-size: 0.9em;
              }
            }
          }
        }
      }

      .links-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: calc(1em * 1);
      }

      .visual-grid {
        grid-template-columns: 1fr;
        gap: calc(1em * 1.5);

        .visual-item {
          text-align: center;

          img {
            max-width: 100%;
            height: auto;
          }
        }
      }
    }

    /* Mobile sidebar moved to top after header - hidden by default */
    > .sidebar-right {
      order: 4;
      position: static;
      margin-top: calc(1em * 1);
      border-top: 1px solid var(--c-dimmer);
      padding-top: calc(1em * 1.5);
      display: none; /* Hidden by default - toggled by hamburger menu */

      .nav-container {
        h2 {
          text-align: center;
          margin-bottom: calc(1em * 1);
        }

        ul {
          display: flex;
          flex-wrap: wrap;
          justify-content: center;
          gap: calc(1em * 1);

          li {
            padding-inline-start: 0;
            margin-block-end: calc(1em * 0.5);
            flex: 1;
            min-width: 120px;

            &:before {
              position: static;
              margin-right: 0.3em;
              transform: rotate(0deg);
            }

            a {
              display: block;
              padding: calc(1em * 0.6);
              text-align: center;
              border-radius: 8px;
              background: rgba(255,255,255,0.02);
              transition: all 0.2s ease;

              &:hover {
                background: rgba(85,68,255,0.1);
                color: var(--c-fg);
              }
            }
          }

          .journal-nav li {
            &:before {
              margin-inline: 0 0.2em;
            }

            a:before {
              content: none;
            }

            span {
              display: inline;
            }
          }
        }
      }
    }
  }
}

@media (max-width: 720px) {
  .layout {
    padding-inline: calc(1em * 0.75);

    > header {
      .header-controls {
        gap: calc(1em * 0.6);
        top: calc(1em * 0.6);
        right: calc(1em * 0.6);

        .control-btn {
          --size: calc(1em * 2.5);
          min-width: calc(1em * 2.5);
          min-height: calc(1em * 2.5);
        }
      }
    }

    > .content-main {
      .intro-section {
        .content-wrapper {
          grid-template-columns: calc(1em * 2.5) 1fr;
          gap: calc(1em * 1);

          .symbol-logo img {
            width: calc(1em * 2);
            height: calc(1em * 2);
          }

          .text-content {
            h1 {
              font-size: calc(1em * 1.3);
              margin-bottom: calc(1em * 0.6);
            }

            .intro-text {
              font-size: calc(1em * 0.95);
              text-justify: auto;
              text-align: left;
              hyphens: none;
              text-indent: 0;
            }
          }
        }
      }

      .section-header {
        gap: calc(1em * 0.6);

        .section-toggle {
          padding: 0.8em 1.5em;
          font-size: 0.95em;
        }
      }

      .music-preview .music-grid .music-item {
        flex-direction: column;
        text-align: center;

        .album-art {
          margin-block-end: calc(1em * 1);

          .album-placeholder {
            width: calc(1em * 3.5 * var(--line-height));
            height: calc(1em * 3.5 * var(--line-height));
          }
        }
      }

      .visual-grid {
        grid-template-columns: 1fr;
        gap: calc(1em * 1.5);
      }

      .featured-section .featured-media iframe {
        aspect-ratio: 4 / 3;
      }
    }
  }
}

@media (max-width: 480px) {
  .layout {
    padding-inline: calc(1em * 0.5);

    > header {
      margin-bottom: calc(1em * 0.8);

      .header-controls {
        gap: calc(1em * 0.4);
        top: calc(1em * 0.5);
        right: calc(1em * 0.5);

        .control-btn {
          --size: calc(1em * 2.2);
        }
      }
    }

    > .content-main {
      .intro-section {
        .content-wrapper {
          grid-template-columns: calc(1em * 2) 1fr;
          gap: calc(1em * 0.8);

          .symbol-logo img {
            width: calc(1em * 1.8);
            height: calc(1em * 1.8);
          }
        }

        h1 {
          font-size: calc(1em * 1.2);
        }

        .intro-text {
          font-size: calc(1em * 1);
        }
      }

      .section-header {
        gap: calc(1em * 0.4);

        .section-toggle {
          padding: 0.7em 1.2em;
          font-size: 0.9em;
        }
      }

      .featured-section .featured-media iframe {
        aspect-ratio: 1 / 1;
      }
    }

    > .sidebar-right {
      .nav-container {
        ul li {
          padding-inline-start: calc(1em * 3);
        }
      }
    }
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Cursor System */
body {
  cursor: url('assets/cursors/glove-normal.cur'), auto;
}

a, button, .control-btn {
  cursor: url('assets/cursors/glove-link.cur'), pointer;
}

input[type="search"], input[type="text"] {
  cursor: url('assets/cursors/glove-text.cur'), text;
}

/* 1930s Mystic Animation Effects */
@keyframes mystic-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes energy-flow {
  0% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg) brightness(1);
  }
  25% {
    background-position: 50% 50%;
    filter: hue-rotate(10deg) brightness(1.05);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(20deg) brightness(1.1);
  }
  75% {
    background-position: 50% 50%;
    filter: hue-rotate(10deg) brightness(1.05);
  }
  100% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg) brightness(1);
  }
}

@keyframes spiritual-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }
  33% {
    transform: translateY(-3px) rotate(1deg);
    opacity: 0.9;
  }
  66% {
    transform: translateY(2px) rotate(-1deg);
    opacity: 0.85;
  }
}

@keyframes esoteric-glow {
  0%, 100% {
    box-shadow:
      inset 2px 2px 8px rgba(0,0,0,0.4),
      inset -2px -2px 6px rgba(255,255,255,0.05),
      0 6px 20px rgba(0,0,0,0.4),
      0 0 0 2px rgba(0,0,0,0.8);
  }
  50% {
    box-shadow:
      inset 2px 2px 8px rgba(0,0,0,0.4),
      inset -2px -2px 6px rgba(255,255,255,0.05),
      0 6px 20px rgba(0,0,0,0.4),
      0 0 2px 4px rgba(255,255,255,0.1);
  }
}

/* Exaggerated 1930s Cartoon Animation Effects */
@keyframes vaudeville-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.8;
  }
  25% {
    transform: translateY(-8px) rotate(2deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-4px) rotate(-1deg);
    opacity: 0.9;
  }
  75% {
    transform: translateY(-12px) rotate(1.5deg);
    opacity: 1;
  }
}

@keyframes film-projector-flicker {
  0%, 100% {
    filter: brightness(1) contrast(1);
    box-shadow:
      inset 2px 2px 8px rgba(0,0,0,0.4),
      inset -2px -2px 6px rgba(255,255,255,0.05),
      0 6px 20px rgba(0,0,0,0.4);
  }
  10% {
    filter: brightness(0.92) contrast(1.1);
  }
  20% {
    filter: brightness(1.08) contrast(0.95);
  }
  30% {
    filter: brightness(0.94) contrast(1.05);
  }
  40% {
    filter: brightness(1) contrast(1);
  }
  50% {
    filter: brightness(0.88) contrast(1.15);
  }
  60% {
    filter: brightness(1.1) contrast(0.9);
  }
  70% {
    filter: brightness(0.96) contrast(1.02);
  }
  80% {
    filter: brightness(1.04) contrast(0.98);
  }
  90% {
    filter: brightness(0.91) contrast(1.08);
  }
}

@keyframes radio-bounce {
  0%, 100% {
    transform: scale(1) translateY(0);
    opacity: 0.9;
  }
  10% {
    transform: scale(1.03) translateY(-1px);
  }
  20% {
    transform: scale(0.98) translateY(1px);
  }
  30% {
    transform: scale(1.02) translateY(-2px);
  }
  40% {
    transform: scale(0.99) translateY(0);
  }
  50% {
    transform: scale(1.05) translateY(-3px);
  }
  60% {
    transform: scale(0.95) translateY(1px);
  }
  70% {
    transform: scale(1.01) translateY(-1px);
  }
  80% {
    transform: scale(1.02) translateY(-2px);
  }
  90% {
    transform: scale(0.97) translateY(1px);
  }
}

@keyframes phonograph-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes vaudeville-neon-glow {
  0%, 100% {
    box-shadow:
      inset 0 0 20px rgba(255, 215, 0, 0.1),
      0 0 10px rgba(255, 215, 0, 0.2),
      0 0 20px rgba(255, 215, 0, 0.1);
    filter: brightness(1) contrast(1);
  }
  10% {
    box-shadow:
      inset 0 0 15px rgba(255, 215, 0, 0.08),
      0 0 8px rgba(255, 215, 0, 0.15),
      0 0 15px rgba(255, 215, 0, 0.08);
    filter: brightness(0.95) contrast(1.02);
  }
  25% {
    box-shadow:
      inset 0 0 25px rgba(255, 215, 0, 0.15),
      0 0 12px rgba(255, 215, 0, 0.25),
      0 0 25px rgba(255, 215, 0, 0.15),
      0 0 35px rgba(255, 215, 0, 0.05);
    filter: brightness(1.05) contrast(0.98);
  }
  50% {
    box-shadow:
      inset 0 0 30px rgba(255, 215, 0, 0.18),
      0 0 15px rgba(255, 215, 0, 0.3),
      0 0 30px rgba(255, 215, 0, 0.18),
      0 0 40px rgba(255, 215, 0, 0.08);
    filter: brightness(1.08) contrast(0.96);
  }
  75% {
    box-shadow:
      inset 0 0 22px rgba(255, 215, 0, 0.12),
      0 0 11px rgba(255, 215, 0, 0.22),
      0 0 22px rgba(255, 215, 0, 0.12);
    filter: brightness(0.98) contrast(1.01);
  }
  85% {
    box-shadow:
      inset 0 0 18px rgba(255, 215, 0, 0.09),
      0 0 9px rgba(255, 215, 0, 0.18),
      0 0 18px rgba(255, 215, 0, 0.09);
    filter: brightness(0.97) contrast(1.03);
  }
}

@keyframes mystic-button-glow {
  0%, 100% {
    box-shadow:
      inset -3px -3px 6px rgba(0,0,0,0.4),
      inset 3px 3px 6px rgba(255,255,255,0.1),
      0 3px 6px rgba(0,0,0,0.3);
    filter: brightness(1);
  }
  25% {
    box-shadow:
      inset -3px -3px 6px rgba(0,0,0,0.4),
      inset 3px 3px 8px rgba(255,255,255,0.15),
      0 3px 6px rgba(0,0,0,0.3),
      0 0 4px rgba(255,215,0,0.1);
    filter: brightness(1.02);
  }
  50% {
    box-shadow:
      inset -4px -4px 7px rgba(0,0,0,0.45),
      inset 4px 4px 7px rgba(255,255,255,0.12),
      0 3px 6px rgba(0,0,0,0.3),
      0 0 6px rgba(255,215,0,0.15);
    filter: brightness(1.05);
  }
  75% {
    box-shadow:
      inset -3px -3px 6px rgba(0,0,0,0.4),
      inset 3px 3px 6px rgba(255,255,255,0.1),
      0 3px 6px rgba(0,0,0,0.3),
      0 0 3px rgba(255,215,0,0.08);
    filter: brightness(1.01);
  }
}

@keyframes typewriter-appear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  10% {
    opacity: 0.1;
    transform: translateY(8px);
  }
  20% {
    opacity: 0.2;
    transform: translateY(6px);
  }
  30% {
    opacity: 0.4;
    transform: translateY(4px);
  }
  40% {
    opacity: 0.6;
    transform: translateY(2px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(1px);
  }
  60% {
    opacity: 0.9;
    transform: translateY(0);
  }
  70% {
    opacity: 1;
    transform: translateY(-1px);
  }
  80% {
    transform: translateY(0);
  }
  90% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes vaudeville-neon {
  0%, 100% {
    text-shadow: 0 0 5px var(--c-accent), 0 0 10px var(--c-accent), 0 0 15px var(--c-accent);
    color: var(--c-fg);
  }
  25% {
    text-shadow: 0 0 8px var(--c-accent), 0 0 16px var(--c-accent), 0 0 24px var(--c-accent), 0 0 32px var(--c-accent);
    color: var(--c-accent);
  }
  50% {
    text-shadow: 0 0 10px var(--c-accent), 0 0 20px var(--c-accent), 0 0 30px var(--c-accent);
    color: var(--c-fg);
  }
  75% {
    text-shadow: 0 0 6px var(--c-accent), 0 0 12px var(--c-accent), 0 0 18px var(--c-accent);
    color: var(--c-accent);
  }
}

@keyframes radio-wave-bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 3px var(--c-accent);
  }
  25% {
    transform: translateY(-2px) scale(1.02);
    text-shadow: 0 0 5px var(--c-accent), 0 0 10px var(--c-accent);
  }
  50% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 7px var(--c-accent), 0 0 14px var(--c-accent), 0 0 21px var(--c-accent);
  }
  75% {
    transform: translateY(-1px) scale(1.01);
    text-shadow: 0 0 4px var(--c-accent);
  }
}

@keyframes crackle-static {
  0%, 100% {
    background-position: 0 0;
    opacity: 0.1;
  }
  10% {
    opacity: 0.3;
  }
  25% {
    background-position: 20px 10px;
  }
  50% {
    background-position: -15px 20px;
  }
  75% {
    background-position: 10px -10px;
  }
}

@keyframes mechanical-jolt {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
    filter: saturate(1);
  }
  10% {
    transform: translateX(1px) rotate(0.2deg);
    filter: saturate(1.1);
  }
  20% {
    transform: translateX(-1px) rotate(-0.1deg);
    filter: saturate(0.9);
  }
  30% {
    transform: translateX(0.5px) rotate(0.1deg);
    filter: saturate(1.05);
  }
  40% {
    transform: translateX(-0.5px) rotate(-0.2deg);
    filter: saturate(0.95);
  }
  50% {
    transform: translateX(1.5px) rotate(0.3deg);
    filter: saturate(1.15);
  }
  60% {
    transform: translateX(-0.8px) rotate(-0.1deg);
    filter: saturate(0.85);
  }
  70% {
    transform: translateX(0.3px) rotate(0.1deg);
    filter: saturate(1.02);
  }
  80% {
    transform: translateX(-0.2px) rotate(0.05deg);
    filter: saturate(0.98);
  }
  90% {
    transform: translateX(0.1px) rotate(-0.05deg);
    filter: saturate(1.01);
  }
}

@keyframes gramophone-needle {
  0%, 100% {
    transform-origin: top center;
    animation-timing-function: ease-in-out;
  }
  25% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
}

@keyframes vaudeville-curtain {
  0% {
    transform: scaleX(0) scaleY(0.1);
    opacity: 0;
  }
  20% {
    transform: scaleX(0.3) scaleY(0.5);
    opacity: 0.7;
  }
  40% {
    transform: scaleX(0.6) scaleY(0.8);
    opacity: 0.9;
  }
  60% {
    transform: scaleX(0.8) scaleY(0.95);
    opacity: 1;
  }
  80% {
    transform: scaleX(0.95) scaleY(0.98);
  }
  100% {
    transform: scaleX(1) scaleY(1);
  }
}

@keyframes rolling-credits {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* Additional exaggerated effects */
.section-toggle:active {
  animation: mechanical-jolt 0.6s ease-out;
}

.control-btn:hover {
  animation: gramophone-needle 1.5s ease-in-out;
}

.music-item:hover {
  animation: vaudeville-curtain 0.8s ease-out;
}

.layout > main .content-section.id#blog-section .section-content.show .blog-post {
  animation: rolling-credits 15s linear infinite;
}

/* Activate exaggerated 1930s animations when page loads */
body.loaded .nav-menu li:before {
  animation: vaudeville-float 6s ease-in-out infinite;
}

body.loaded .header-image-container {
  animation: film-projector-flicker 4s ease-in-out infinite;
}

body.loaded .section-toggle {
  animation: radio-bounce 5s ease-in-out infinite;
}

body.loaded .control-btn {
  animation: mystic-button-glow 12s ease-in-out infinite;
}

body.loaded .album-player {
  animation: vaudeville-neon-glow 6s ease-in-out infinite;
}

body.loaded .section-title {
  animation: typewriter-appear 3s ease-out forwards;
}

body.loaded .blog-post h3 {
  animation: vaudeville-neon 2s ease-in-out infinite;
}

body.loaded .music-info h4 {
  animation: radio-wave-bounce 4s ease-in-out infinite;
}

/* Content sections that expand when clicked */
.content-section {
  margin-block-end: calc(1em * 4 * var(--line-height));

  .section-header {
    display: flex;
    align-items: center;
    gap: 1em;
    padding-block-end: calc(1em * 1 * var(--line-height));
    border-block-end: 1px dotted var(--c-dimmer);
    margin-block-end: calc(1em * 1.5 * var(--line-height));
  }

  .section-title {
    font-family: var(--font-accent);
    font-size: calc(1em * 1.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-fg);
    margin: 0;
  }

  .section-toggle {
    background: var(--c-bg-dark);
    border: 2px inset var(--c-dimmer);
    color: var(--c-muted);
    padding: 0.6em 1.25em;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow:
      inset -2px -2px 4px rgba(0,0,0,0.3),
      inset 2px 2px 4px rgba(255,255,255,0.1),
      0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;

    &:hover {
      background: linear-gradient(145deg, var(--c-accent), rgba(85,68,255,0.8));
      color: var(--c-bg);
      border-color: var(--c-highlight);
      box-shadow:
        inset -3px -3px 6px rgba(0,0,0,0.4),
        inset 3px 3px 6px rgba(255,255,255,0.2),
        0 4px 8px rgba(85,68,255,0.3);
      transform: translateY(-1px);
    }

    &:active {
      box-shadow:
        inset 2px 2px 4px rgba(0,0,0,0.4),
        inset -2px -2px 4px rgba(255,255,255,0.1);
      transform: translateY(0);
    }
  }

  .section-content {
    display: none;
    animation: content-fade-in 0.3s ease;
    /* Frutiger Aero transparency effect */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: calc(1em * 1.5);
    margin-top: calc(1em * 0.5);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);

    &.show {
      display: block;
    }

    .section-media {
      /* Square container for GIFs */
      aspect-ratio: 1 / 1;
      width: 100%;
      max-width: 300px; /* Limit max size on larger screens */
      margin: 0 auto calc(1em * 1.5);
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--c-dimmer);
      box-shadow:
        inset 2px 2px 8px rgba(0,0,0,0.3),
        0 4px 12px rgba(0,0,0,0.2);

      @media (max-width: 720px) {
        max-width: 100%;
        aspect-ratio: 1 / 1;
      }

      img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Fill square perfectly */
        display: block;
      }
    }
  }
}

@keyframes content-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced grid items for interactivity */
.grid-item.interactive {
  position: relative;
  overflow: visible;

  &::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--c-accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse-dot 2s ease-in-out infinite;
  }

  &:hover::after {
    animation-duration: 0.8s;
  }
}

/* Occult-themed decorative elements */
.navigation-decoration {
  position: absolute;
  top: 20px;
  left: 20px;
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
  font-size: 2rem;
  color: var(--c-accent);
  transform: rotate(-15deg);
  font-family: 'Times New Roman', Georgia, serif;
}

.alchemical-symbol {
  content: "☽";
  position: absolute;
  top: 50px;
  right: 50px;
  opacity: 0.08;
  pointer-events: none;
  z-index: -1;
  font-size: 3rem;
  color: var(--c-highlight);
  transform: rotate(180deg);
}

.esoteric-ornament {
  position: absolute;
  bottom: 100px;
  left: 100px;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, var(--c-accent) 0%, transparent 70%);
  border-radius: 50%;
  animation: esoteric-float 20s ease-in-out infinite;
}

@keyframes esoteric-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.05;
  }
  25% {
    transform: translateY(-10px) rotate(90deg);
    opacity: 0.08;
  }
  50% {
    transform: translateY(-5px) rotate(180deg);
    opacity: 0.03;
  }
  75% {
    transform: translateY(-15px) rotate(270deg);
    opacity: 0.06;
  }
}

/* Subtle energy field around interactive elements */
.interactive-element::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: radial-gradient(ellipse, rgba(85, 68, 255, 0.1) 0%, transparent 70%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.interactive-element:hover::before {
  opacity: 1;
}

.section-content:hover::after {
  content: "॰";
  position: absolute;
  bottom: -10px;
  right: -10px;
  font-size: 2rem;
  color: var(--c-accent);
  opacity: 0.3;
  pointer-events: none;
}

/* 1930s-style shadow effects */  
.content-section .section-content {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-image-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.02) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.01) 100%
  );
  pointer-events: none;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Search result item styling */
.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid var(--c-dimmer);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 60px;
  display: flex;
  align-items: center;

  &:hover {
    background: rgba(85, 68, 255, 0.1);
  }

  &:last-child {
    border-bottom: none;
  }

  h4 {
    color: var(--c-fg);
    margin-bottom: 0.25rem;
    margin: 0;
  }

  p {
    color: var(--c-dim);
    margin: 0;
    font-size: 0.9rem;
  }
}

/* Expandable journal entries */
.journal-info {
  display: none;
  margin-block-start: calc(1em * 1.5 * var(--line-height));
  padding: calc(1em * 1.5);
  background: rgba(85, 68, 255, 0.02);
  border: 1px dotted var(--c-dimmer);
  border-radius: 8px;
  animation: content-fade-in 0.3s ease;

  &.show {
    display: block;
  }

  .journal-excerpt {
    font-style: italic;
    color: var(--c-dim);
    margin-block-end: 1em;
  }

  .journal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: var(--c-dim);
  }
}
