/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

    :root {
      --ink: #1c2218;
      --ink-faint: #384233;
      --ink-ghost: #6b7a65;
      --bg: #e4e8d8;
      --bg2: #d5dbc4;
      --bg3: #bec7ac;
      --accent1: #3d6b3a;
      --accent2: #2b5278;
      --accent3: #6aab98;
      --moss: #4e7c3f;
      --slate: #5a7a9e;
      --teal: #3a8e7a;
      --rust: #8c4a2a;
      --dim: rgba(28,34,24,0.07);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }

    body {
      font-family: 'Alegreya', Georgia, serif;
      background: var(--bg);
      color: var(--ink);
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* ── ORGANIC BACKGROUND ── */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image:
        radial-gradient(ellipse 60% 40% at 15% 20%, rgba(78,124,63,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 85% 75%, rgba(58,142,122,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 70% 30% at 50% 90%, rgba(61,107,58,0.05) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
    }

    /* ── PAPER TEXTURE ── */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
      opacity: 0.04;
      pointer-events: none;
      z-index: 0;
    }

    main { position: relative; z-index: 1; }

    /* ── BOTANICAL DECORATIONS ── */
    .botanical {
      position: fixed;
      pointer-events: none;
      z-index: 0;
      opacity: 0.07;
    }
    .botanical.b1 { top: 4%; left: 2%; width: 180px; transform: rotate(-12deg); }
    .botanical.b2 { top: 30%; right: 1%; width: 140px; transform: rotate(20deg); }
    .botanical.b3 { bottom: 10%; left: 5%; width: 120px; transform: rotate(8deg); }

    /* ── HEADER ── */
    header {
      padding: 3.5rem 3rem 0;
      text-align: center;
      position: relative;
    }

    .title-rule {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      margin-bottom: 1.5rem;
      color: var(--bg3);
      font-family: 'DM Mono', monospace;
      font-size: 0.7rem;
      letter-spacing: 0.2em;
    }
    .title-rule::before,
    .title-rule::after {
      content: '';
      display: block;
      height: 1px;
      width: 80px;
      background: var(--bg3);
    }

    .site-title {
      font-family: 'Alegreya', Georgia, serif;
      font-size: clamp(3rem, 9vw, 6.5rem);
      font-weight: 700;
      font-style: italic;
      letter-spacing: -0.02em;
      line-height: 1;
      color: var(--ink);
      padding-bottom: 0.5rem;
    }
    .site-title .diary { color: var(--accent1); }

    .site-tagline {
      font-family: 'Libre Baskerville', Georgia, serif;
      font-style: italic;
      font-size: 0.95rem;
      color: var(--ink-ghost);
      padding: 0.75rem 0 2.5rem;
      letter-spacing: 0.03em;
    }

    /* ── NAV ── */
    nav {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      border-top: 1px solid var(--bg3);
      border-bottom: 1px solid var(--bg3);
      background: rgba(213, 219, 196, 0.6);
      backdrop-filter: blur(6px);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    nav a {
      font-family: 'DM Mono', monospace;
      font-size: 0.68rem;
      letter-spacing: 0.1em;
      text-transform: lowercase;
      color: var(--ink-faint);
      text-decoration: none;
      padding: 0.8rem 1.5rem;
      border-right: 1px solid var(--bg3);
      transition: background 0.2s, color 0.2s;
      position: relative;
    }
    nav a:first-child { border-left: 1px solid var(--bg3); }
    nav a:hover { background: var(--bg3); color: var(--ink); }
    nav a::after {
      content: '✿';
      position: absolute;
      top: 2px; right: 4px;
      font-size: 0.45rem;
      color: var(--accent1);
      opacity: 0;
      transition: opacity 0.2s;
    }
    nav a:hover::after { opacity: 0.6; }

    /* ── DIVIDER ── */
    .divider {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      padding: 1.5rem 3rem;
      color: var(--bg3);
      font-size: 0.85rem;
    }
    .divider::before, .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--bg3);
    }

    /* ── MAIN LAYOUT ── */
    .layout {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0.5rem 2rem 5rem;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
    }

    /* ── CARDS ── */
    .card {
      background: var(--bg2);
      border: 1px solid var(--bg3);
      padding: 2rem;
      position: relative;
      overflow: hidden;
      transition: transform 0.3s cubic-bezier(.2,.8,.3,1), box-shadow 0.3s;
      text-decoration: none;
      color: inherit;
      display: block;
    }
    .card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      z-index: 1;
    }
    .card:hover {
      transform: translateY(-4px) rotate(-0.3deg);
      box-shadow: 4px 16px 40px rgba(28,34,24,0.13);
    }
    .card.moss::before  { background: var(--accent1); }
    .card.slate::before { background: var(--accent2); }
    .card.teal::before  { background: var(--teal); }
    .card.wide { grid-column: 1 / -1; }
    .card.tall { grid-row: span 2; }

    .card .watermark {
      position: absolute;
      bottom: -10px; right: -10px;
      width: 110px;
      opacity: 0.05;
      pointer-events: none;
      transform: rotate(15deg);
    }

    .card-label {
      font-family: 'DM Mono', monospace;
      font-size: 0.62rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--ink-ghost);
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .card-label::before { content: '✦'; font-size: 0.4rem; }

    .card h2 {
      font-family: 'Alegreya', Georgia, serif;
      font-size: 2rem;
      font-weight: 700;
      font-style: italic;
      line-height: 1.1;
      margin-bottom: 0.75rem;
      color: var(--ink);
    }
    .card p {
      font-size: 1rem;
      line-height: 1.75;
      color: var(--ink-faint);
    }
    .card .arrow {
      position: absolute;
      bottom: 1.5rem; right: 2rem;
      font-family: 'DM Mono', monospace;
      font-size: 1.1rem;
      color: var(--bg3);
      transition: transform 0.2s, color 0.2s;
    }
    .card:hover .arrow { transform: translate(4px, -4px); color: var(--ink-ghost); }

    /* intro */
    .card.intro {
      background: var(--ink);
      color: var(--bg);
      grid-column: 1 / -1;
      cursor: default;
    }
    .card.intro::before { background: var(--accent3); }
    .card.intro .card-label { color: rgba(190,199,172,0.6); }
    .card.intro h2 { color: var(--bg); font-size: 1.35rem; font-weight: 400; line-height: 1.65; }
    .card.intro p { color: rgba(228,232,216,0.65); font-size: 0.95rem; margin-top: 0.75rem; }

    /* music bars */
    .music-visual {
      display: flex;
      gap: 4px;
      align-items: flex-end;
      height: 48px;
      margin-bottom: 1.25rem;
    }
    .bar {
      width: 5px;
      background: var(--accent1);
      border-radius: 2px 2px 0 0;
      animation: bounce 1.4s ease-in-out infinite;
      opacity: 0.6;
    }
    @keyframes bounce {
      0%, 100% { transform: scaleY(0.35); }
      50%       { transform: scaleY(1); }
    }
    .bar:nth-child(1) { height: 32px; animation-delay: 0s; }
    .bar:nth-child(2) { height: 44px; animation-delay: 0.18s; }
    .bar:nth-child(3) { height: 26px; animation-delay: 0.36s; }
    .bar:nth-child(4) { height: 48px; animation-delay: 0.54s; }
    .bar:nth-child(5) { height: 36px; animation-delay: 0.72s; }
    .bar:nth-child(6) { height: 20px; animation-delay: 0.9s; }
    .bar:nth-child(7) { height: 40px; animation-delay: 1.08s; }
    .bar:nth-child(8) { height: 30px; animation-delay: 1.26s; }

    /* poem snippet */
    .poem-snippet {
      font-family: 'Libre Baskerville', Georgia, serif;
      font-style: italic;
      font-size: 0.92rem;
      color: var(--ink-ghost);
      line-height: 2;
      margin-bottom: 1rem;
      border-left: 2px solid var(--bg3);
      padding-left: 1rem;
    }

    /* forage tags */
    .forage-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-bottom: 1.25rem;
    }
    .tag {
      font-family: 'DM Mono', monospace;
      font-size: 0.6rem;
      padding: 0.2rem 0.6rem;
      border: 1px solid var(--bg3);
      color: var(--ink-ghost);
      letter-spacing: 0.05em;
      border-radius: 2px;
    }

    /* melee bracket */
    .melee-bracket {
      font-family: 'DM Mono', monospace;
      font-size: 0.72rem;
      color: var(--ink-ghost);
      line-height: 2.2;
      margin-bottom: 1rem;
    }

    /* listening rows */
    .listening-rows {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin-bottom: 1rem;
    }
    .listening-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
    .listening-row .dot {
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--accent3);
      flex-shrink: 0;
    }

    /* footer */
    footer {
      border-top: 1px solid var(--bg3);
      padding: 2rem 3rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: relative;
      z-index: 1;
    }
    footer p {
      font-family: 'DM Mono', monospace;
      font-size: 0.62rem;
      letter-spacing: 0.08em;
      color: var(--ink-ghost);
    }
    footer .footer-ornament { font-size: 1rem; color: var(--bg3); letter-spacing: 0.3em; }

    @media (max-width: 680px) {
      header { padding: 2rem 1.5rem 0; }
      .layout { grid-template-columns: 1fr; padding: 1rem 1rem 3rem; }
      .card.wide, .card.tall { grid-column: 1; grid-row: span 1; }
      nav a { padding: 0.75rem 0.9rem; font-size: 0.6rem; }
      .botanical { display: none; }
    }
