/* === THEME TOKENS — LIGHT === */
:root{
  /* brand / text */
  --ink: #192231;
  --ink-2: #2f3b59;
  --text-primary: #111;
  --text: #333;
  --text-2: #444;
  --text-3: #555;
  --text-4:#ffffff;

  /* surfaces */
  --bg-0: #f8f8f8;
  --bg-1: #eaeaea;
  --panel-0: #fcfbf9;
  --panel-1: #f2f0ec;
  --muted: #f4f4f4;
  --muted-2: #e1ecf5; /* soft blue hover */
  --muted-3: #e1e6eb; /* dropdown hover */
  --muted-4: #e8eef5; /* nav hover */

  /* accents */
  --accent: #192231;
  --accent-2: #4f5f70;   /* icon/link hover */
  --accent-3: #3a3a3a;   /* darker hover text */
  --ghost-ink: rgba(25, 34, 49, 0.15);
 

  /* borders & hairlines */
  --hairline: rgba(0,0,0,0.05);
  --border: #ccc;
  --border-2: #d6d6d6;

  /* gradients */
  --page-gradient: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
  --panel-gradient: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
  --header-gradient: linear-gradient(to top left, var(--panel-0), var(--panel-1));

  /* shadows */
  --shadow-s: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-m: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-l: 0 6px 18px rgba(0,0,0,0.10);

  /* typography */
  --font-serif: 'Georgia','Libre Baskerville',serif;

  /* focus ring */
  --ring: rgba(86,104,113,0.3);

}




/* === THEME TOKENS — DARK === */
:root[data-theme="dark"]{
  --ink: #e5e7eb;
  --ink-2: #9ca3af;
  --text-primary: #f5f5f5;
  --text: #cbd5e1;
  --text-2: #b6c0cf;
  --text-3: #9ca3af;
  --text-4:#111827;

  --bg-0: #0b0f16;
  --bg-1: #0f1722;
  --panel-0: #111827;
  --panel-1: #0b0f16;
  --muted: #1f2937;
  --muted-2: #243244;
  --muted-3: #1e2632;
  --muted-4: #1a2230;

  --accent: #cbd5e1;
  --accent-2: #a7b1c2;
  --accent-3: #e5e7eb;
  --ghost-ink: rgba(255, 255, 255, 0.22);

  --hairline: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.18);
  --border-2: rgba(255,255,255,0.22);

  --page-gradient: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
  --panel-gradient: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
  --header-gradient: linear-gradient(to top left, var(--panel-0), var(--panel-1));

  --shadow-s: 0 2px 6px rgba(0,0,0,0.35);
  --shadow-m: 0 4px 16px rgba(0,0,0,0.45);
  --shadow-l: 0 8px 28px rgba(0,0,0,0.55);

}

/* Let native controls adapt */
html { color-scheme: light dark; }





body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100%;
    scroll-behavior: smooth;
    background: var(--page-gradient); font-family: var(--font-serif);
    
  }
  
  header {
    position: relative;
    padding: 80px 40px;
    background: var(--header-gradient); box-shadow: var(--shadow-m);
    border-radius: 10px;
   
    transition: padding 0.4s ease, box-shadow 0.4s ease;
  }
  /* === SHRINKED HEADER (ON SCROLL) === */
  header.shrunk {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 35px 35px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    z-index: 999;
  }
  
  /* === MENU CONTAINER SHRINK === */
  header.shrunk .menu-container {
    top: 10px;
    right: 20px;
    gap: 10px;
  }
  
  /* === ICON SHRINK === */
  header.shrunk .icon-common {
    font-size: 20px;
  }
  
  /* === LOGO SHRINK === */
  .logo-image {
    font-size: 40px;
    transition: font-size 0.4s ease, transform 0.4s ease;
  }
  
  header.shrunk .logo-image {
    font-size: 40px;
  }

  header.shrunk .logo {
    top: -10px;
  }
  
  
  /* === MENU ICON SHRINK === */
  header.shrunk .menu-icon {
    width: 24px;
    height: 18px;
    gap: 3px;
  }
  
  header.shrunk .menu-icon div {
    height: 2.5px;
  }
  
  /* === FOOTER (Matching Modern Styling) === */
  footer {
    background: var(--panel-gradient); box-shadow: var(--shadow-s); color: var(--ink);
    padding: 20px;
    text-align: center;
    border-radius: 10px;
  }

  .footer-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
  }
  
  .footer-link:hover {
    color: var(--ink-2);
    text-decoration: underline;
  }
  
  /* Logo container stays the same */
.logo {
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
  }
  .logo-image {
    font-size: 60px;
    color: var(--ink);
    opacity: 0;
    cursor: pointer;
    animation: slideDown 1s ease forwards, 
               softBounce 2.5s ease-in-out infinite 1s;
    transition: color 0.3s ease;
    padding: 10px;
    margin-top: 20px;
    margin-left: 20px;
  }
  
  
  @keyframes softBounce {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-6px); /* Small, elegant lift */
    }
  }
  
  
  /* Optional hover effect for refinement */
  .logo-image:hover {
    color: var(--accent-2);
  }
  

  h1, h2 {
    color: var(--ink);
    text-align: center;
    margin: 0;
    font-weight: 600;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    font-size: 26px;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 6px;
    display: inline-block;
  }
  
  p {
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--text);
    font-size: 16px;
  }
  
  
/* Keyframe for slide-down animation */
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-100px); /* Start 100px above */
}
to {
opacity: 1;
transform: translateY(0); /* End at the original position */
}
}

/* Keyframe for bounce animation */
@keyframes pronounced-bounce {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
}


/* === ABOUT / LOGO MODAL OVERLAY (opens book) === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto; /* Allow scroll for entire modal on small devices */
  }
  
  /* === MODAL CONTENT (elegant look) === */
  .modal-content {
    position: absolute;
    overflow-y: auto;  
    max-height: 80vh;     
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1)); /* Soft ivory gradient */
    border-radius: 14px;
    padding: 30px 25px;
    width: 90%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    font-family: 'Georgia', 'Libre Baskerville', serif;
    animation: fadeInModal 0.4s ease-out;
    border: none;
  }
  
  /* === MODAL HEADER TEXT (unified style) === */
  .modal-header {
    font-size: 22px;
    font-weight: 600;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--ink);
    border-bottom: 2px solid var(--ink);
    padding-bottom: 6px;
    margin-bottom: 20px;
    display: inline-block;
    background: none;
    border-radius: 0;
    text-align: center;
  }
  
  /* === CLOSE BUTTON === */
  .close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 20px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: color 0.3s ease;
  }
  
  .close:hover,
  .close:focus {
    color: var(--ink);
    text-decoration: none;
  }
  
  @keyframes fadeInModal {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
  }

  @media (max-width: 600px) {
    .modal-content {
      width: 80%;
      padding: 24px 18px;
      font-size: 15px;
      max-height: 80vh
    }
  
    .modal-header {
      font-size: 20px;
    }
  
    .close {
      top: 10px;
      right: 12px;
      font-size: 18px;
    }
  }
  
  

/* this is the styling for the newsletter which is accessed through the letter icon at the top of the menu */
/* === EMAIL INPUT === */
#newsletterForm input[type="email"] {
  width: 80%;
  padding: 12px 16px;
  margin-top: 10px;
  font-size: 16px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  color: var(--ink);
  background-color: var(--muted);
  border: 2px solid var(--ink);
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* === FOCUS EFFECT === */
#newsletterForm input[type="email"]:focus {
  border-color: #566871;
  box-shadow: 0 0 8px rgba(86, 104, 113, 0.3);
  background-color: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
}

/* === SUBSCRIBE BUTTON === */
#newsletterForm button {
  background-color: #192231;
  color: white;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  font-size: 15px;
  padding: 10px 22px;
  margin-top: 14px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* === HOVER BUTTON === */
#newsletterForm button:hover {
  background-color: white;
  color: #192231;
}

.book-link {
    text-decoration: none; /* Prevent native underline */
    color: var(--ink);
    font-family: 'Georgia', 'Libre Baskerville', serif;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
  }
  
  .book-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 100%;
    background-color: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  
  .book-link:hover {
    color: var(--accent-3);
    text-decoration: none; /* Double check underline is off */
  }
  
  .book-link:hover::after {
    transform: scaleX(1);
  }
  

  .modal-ok-btn {
    font-size: 14px;
    font-weight: bold;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background-color: var(--muted); /* Light neutral */
    color: var(--ink);
    padding: 10px 16px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
   
}

.modal-ok-btn:hover {
    background-color: var(--muted-2); /* Gentle blue tone */
    transform: scale(1.01);
}

  
  


/* this is the drop down menu icon styling that is included for any icon added that is placed in the top right corner */


        /* Menu Container */
.menu-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px; /* Adds spacing between icons */
}
/* === MENU ICON === */
.menu-icon {
    width: 30px;
    height: 25px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
  }
  
  .menu-icon div {
    width: 100%;
    height: 4px;
    background-color: var(--ink); /* Midnight blue */
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  
  .menu-icon:hover div {
    background-color: #3a4a5a; /* Slightly lighter, elegant hover */
  }
  
  /* === INDIVIDUAL ICONS === */
  .home-icon,
  .dark-icon,
  .linkedin-icon,
  .contact-icon,
  .book-icon,
  .essay-nav-icon,
  .project-nav-icon {
    font-size: 26px;
    color: var(--ink);
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  
  .home-icon:hover,
  .dark-icon:hover,
  .linkedin-icon:hover,
  .contact-icon:hover,
  .book-icon:hover,
  .essay-nav-icon:hover,
  .project-nav-icon:hover{
    color: var(--accent-2); /* Subtle elegant hover */
  }
  
  /* === SHARED ICON LOGIC === */
  .icon-common {
    position: relative;
    cursor: pointer;
    opacity: 0;
    animation: slideInRight 1s ease forwards;
  }.icon-common {
    position: relative;
    cursor: pointer;
  }
  
  /* Tooltip base */
  .icon-common::after {
    content: attr(data-tooltip);
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #192231;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-family: 'Georgia', 'Libre Baskerville', serif;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  /* Show it */
  .icon-common.show-tooltip::after {
    opacity: 1;
    visibility: visible;
  }
  
  /* Smooth hide */
  .icon-common.hide-tooltip::after {
    opacity: 0;
    visibility: hidden;
  }
  
  /* Hover (desktop only) */
  @media (hover: hover) and (pointer: fine) {
    .icon-common:hover::after {
      opacity: 1;
      visibility: visible;
    }
  
    .icon-common:hover {
      transform: scale(1.1);
      color: var(--accent-2);
    }
  }
  
  
  /* === SLIDE-IN ANIMATION (unchanged) === */
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(100px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @media (max-width: 600px) {
    .menu-container {
      top: 14px;
      right: 14px;
      gap: 10px;
    }
  
    .menu-icon {
      width: 26px;
      height: 20px;
      gap: 3px;
    }
  
    .menu-icon div {
      height: 3px;
    }
  
    .home-icon,
    .dark-icon,
    .linkedin-icon,
    .contact-icon,
    .book-icon,
    .essay-nav-icon,
    .project-nav-icon {
      font-size: 22px;
      margin-right: 10px;
    }
  
    .icon-common::after {
      font-size: 11px;
      padding: 4px 8px;
    }
  }
  
  
/* === REFINED DROPDOWN CONTAINER === */
.dropdown {
    position: absolute;
    right: 0;
    top: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.6s ease-in-out;
    background-color: var(--muted);
    z-index: 1000;
  }
  
  /* === SHOW WHEN ACTIVE === */
  .dropdown.active {
    max-height: 300px;
  }
  
  /* === DROPDOWN LINKS === */
  .dropdown a {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    font-size: 15px;
    color: var(--ink);
    background-color: var(--muted);
    border-top: 1px solid rgba(25, 34, 49, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
  }
  
  /* === SHOW LINK WITH STAGGER === */
  .dropdown a.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* === HOVER EFFECT === */
  .dropdown a:hover {
    background-color: var(--muted-3);
    color: var(--ink);
    padding-left: 22px;
  }

  /* === CHIP THEME HOOKS === */
:root{
  --brand-navy: #192231;            /* your blue (constant) */
  --chip-bg: var(--muted);
  --chip-bg-hover: var(--muted-3);
  --chip-fg: var(--ink);
  --chip-border: var(--hairline);
}

:root[data-theme="dark"]{
  --chip-bg: #ffffff;               /* white pill in dark */
  --chip-bg-hover: #ffffff;
  --chip-fg: var(--brand-navy);     /* blue text in dark */
  --chip-border: rgba(0,0,0,0.10);  /* subtle border on white */
}
/* actions row — unchanged layout */
.essay-actions{
  display:inline-flex;
  gap:.6rem;
  margin-top:.5rem;
  align-items:center;
}

/* elegant pill obeying theme vars */
.btn-chip{
  display:inline-flex; align-items:center; gap:.55rem;
  padding:.5rem .85rem;
  border-radius:999px;
  border:1px solid var(--chip-border);
  background:
    linear-gradient(to bottom right,
      color-mix(in srgb, var(--chip-bg) 92%, #fff),
      color-mix(in srgb, var(--chip-bg) 78%, #fff)
    ),
    var(--chip-bg);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  backdrop-filter: saturate(120%) blur(6px);
  color:var(--chip-fg);
  font:500 .98rem/1.1 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  letter-spacing:.01em;
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 2px 6px rgba(0,0,0,.06),
    var(--shadow-s);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:
    transform .18s ease,
    box-shadow .22s ease,
    background .22s ease,
    border-color .22s ease,
    color .22s ease;
}

.btn-chip i{
  font-size:.95rem;
  opacity:.9;
  transition: transform .18s ease, opacity .18s ease;
}

/* hover: soft lift + gentle accent edge */
.btn-chip:hover{
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.8) inset,
    0 8px 18px rgba(0,0,0,.10);
  border-color: color-mix(in srgb, var(--chip-border) 70%, var(--accent) 30%);
  background:
    linear-gradient(to bottom right,
      color-mix(in srgb, var(--chip-bg) 96%, #fff),
      color-mix(in srgb, var(--chip-bg) 86%, #fff)
    ),
    var(--chip-bg-hover);
}

/* tasteful icon motion */
.btn-chip:hover i.fa-share{ transform: translateX(2px) rotate(-6deg); opacity:1; }
.btn-chip:hover i.fa-quote-right{ transform: translateY(-1px); opacity:1; }

/* press + focus */
.btn-chip:active{ transform: translateY(0) scale(.985); }
.btn-chip:focus-visible{
  outline:none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--ring) 60%, transparent),
    0 6px 14px rgba(0,0,0,.12);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .btn-chip, .btn-chip i{ transition:none }
}

/* ==== CITE MODAL (unchanged basics) ==== */
.cite-modal{
  width:min(640px, calc(100vw - 48px));
  border:1px solid var(--hairline);
  border-radius:14px;
  padding:18px 18px 14px;
  background: var(--panel-gradient);
  color:var(--ink);
  box-shadow: var(--shadow-l);
  position: relative; /* for the top-right X */
}

.cite-modal::backdrop{
  background: rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
  backdrop-filter: blur(3px) saturate(120%);
}

.cite-title{
  margin:0 0 .5rem 0;
  font-family: var(--font-serif);
  font-size:1.05rem;
  color:var(--ink);
}

.cite-pre{
  margin:0 0 .9rem 0;
  padding:.75rem .9rem;
  border:1px dashed var(--border-2);
  border-radius:10px;
  background: var(--muted);
  color: var(--ink-2);
  font: 500 .95rem/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  word-break: break-word;
}

.cite-actions{ display:flex; gap:.5rem; justify-content:flex-end; }

/* Top-right X (only close control) */
.cite-x{
  position:absolute; top:10px; right:10px;
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:999px;
  border:1px solid var(--hairline);
  background: var(--muted);
  color: var(--ink);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.cite-x:hover{ transform: translateY(-1px); box-shadow: var(--shadow-s); }
.cite-x:focus-visible{ outline:2px solid var(--ring); outline-offset:2px; }

/* Copy button (scoped to modal; gentle hover) */
.cite-modal .btn-chip{
  display:inline-flex; align-items:center; gap:.55rem;
  padding:.48rem .8rem;
  border-radius:999px;
  border:1px solid var(--hairline);
  background: var(--muted);
  color: var(--ink);
  font:500 .96rem/1.1 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  letter-spacing:.01em;
  box-shadow: var(--shadow-s);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.cite-modal .btn-chip i{ font-size:.95rem; opacity:.9; transition: transform .14s ease, opacity .14s ease; }

.cite-modal .btn-chip:hover{ transform: translateY(-0.5px); box-shadow: 0 6px 14px rgba(0,0,0,.10); }
.cite-modal .btn-chip:active{ transform: translateY(0); }

/* Dark theme: white pill, navy text, crisp white outline */
:root[data-theme="dark"] .cite-modal .btn-chip{
  background: rgba(255,255,255,.96);
  color: #192231;                               /* brand navy */
  border-color: rgba(255,255,255,.98);          /* white outline */
}
:root[data-theme="dark"] .cite-x{
  background: rgba(255,255,255,.92);
  color: #192231;
  border-color: rgba(255,255,255,.98);
}

/* >>> Persistent copied state (higher specificity; put AFTER rules above) */
.cite-modal .copy-cite.copied{
  color:#2e7d32;                                 /* green stays until close */
  border-color: color-mix(in srgb, #2e7d32 40%, var(--hairline));
  background: color-mix(in srgb, var(--muted) 85%, #e8f5e9 15%);
}
:root[data-theme="dark"] .cite-modal .copy-cite.copied{
  /* ensure it stays readable on white pill in dark */
  background: color-mix(in srgb, #ffffff 90%, #e8f5e9 10%);
  color:#2e7d32;
  border-color:#ffffff;
}
.cite-modal .copy-cite.copied i{ transform:scale(1.06); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .cite-modal .btn-chip, .cite-modal .btn-chip i, .cite-x{ transition:none }
}




/* Position ONLY — apply to all header variants you use */
:is(header, .header, .dissertation-header, .thesis-header) .essay-actions{
  position: absolute;
  left: 40px;    /* align with your 40px header padding */
  bottom: 24px;
  display: flex;
  gap: .5rem;
  z-index: 2;
}

/* Mobile tweak stays the same */
@media (max-width: 480px){
  :is(header, .header, .dissertation-header, .thesis-header) .essay-actions{
    left: 20px;
    bottom: 20px;
  }
}



/* === Toast (styled alert) === */
.bat-toast{
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  transform: translateX(-50%) translateY(6px);
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .55rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--ink);
  color: var(--text-4);
  box-shadow: var(--shadow-m);
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;   /* allow click to dismiss */
}
.bat-toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }
.bat-toast i{ font-size: .95rem; opacity: .9; }
.bat-toast button{
  margin-left:.5rem; background: none; border: 0; color: inherit;
  font: inherit; cursor: pointer; opacity:.8;
}
.bat-toast button:hover{ opacity:1; }

/* Dark theme keeps your palette */
:root[data-theme="dark"] .bat-toast{
  background: var(--muted);
  color: var(--ink);
  border-color: var(--hairline);
}


  .essay-container {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
  }


  .content-container {
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    border-radius: 10px;
    padding: 40px 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
  }
  
  .content-container.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .content-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
  }
  


.content-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
    font-family: 'Georgia', 'Libre Baskerville', serif;
    text-align: center;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 6px;
    margin: 0 auto 30px auto;
    display: table; /* restricts underline to text width */
  }
  
  
  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
  }
  
  .content img {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
  }
  
  .content img:hover {
    transform: scale(1.05);
  }
  
  .content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    margin: 10px 0 20px;
  }
  .reading-time-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink);
    margin-bottom: 10px;
    text-align: center;
  }
  
  .reading-time-container i {
    color: var(--ink);
  }
  
  .read-more-button {
    background-color: var(--muted);
    border: 2px solid var(--ink);
    color: var(--ink);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
  }
  
  .read-more-button:hover {
    background-color: var(--muted-2);
    transform: scale(1.01);
  }
  

/* Entrance Animation */
.read-more-button {
    animation: fadeIn 0.5s ease-in-out;
}

/* Keyframes for clean fade-in effect */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95); /* Slightly smaller on load */
    }
    100% {
        opacity: 1;
        transform: scale(1); /* Reset to normal */
    }
}



/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .content {
        flex-direction: column; /* Stack image and text vertically */
        align-items: center;
    }

    .content img {
        max-width: 100%; /* Full width for smaller screens */
        margin-bottom: 15px; /* Space below the image */
    }

    .content p {
        text-align: center; /* Center-align text */
    }

    .read-more-button {
        margin-top: 15px; /* Space above button */
    }
}

/*Sort btn for essays from oldest to newest*/



.filter-container {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--muted); /* Consistent with your button backgrounds */
    padding: 5px 10px;
    border-radius: 10px;
    border: 2px solid var(--ink);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-20px);
  animation: dropFadeIn 0.8s ease-out forwards;
    animation-delay: 0.3s;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    z-index: 10;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

/* Modern Dropdown Styling */
.filter-dropdown {
    background-color: #ffffff;
    border: 2px solid var(--ink);
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: #192231;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23192231' d='M2 0L0 2h4zM2 5l2-2H0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 26px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 2px rgba(25, 34, 49, 0.2);
}

.filter-dropdown option {
    color: var(--ink);
    background-color: #ffffff;
}

/* === Smooth Animation === */
/* Smooth fade & drop */
@keyframes dropFadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

/* === Responsive Adjustments === */
@media (max-width: 600px) {
    .filter-container {
        padding: 5px 10px;
        font-size: 14px;
    }

    .filter-label {
        font-size: 14px;
    }

    .filter-dropdown {
        font-size: 13px;
        padding: 4px 8px;
        padding-right: 24px;
    }
}

@media (max-width: 480px) {
    .filter-container {
        padding: 4px 8px;
        font-size: 13px;
        border-radius: 8px;
    }

    .filter-label {
        font-size: 13px;
    }

    .filter-dropdown {
        font-size: 12.5px;
        padding: 3px 7px;
        padding-right: 22px;
    }
}




/* this is the nav bar for the essays page */

/* Navigation Bar */

@keyframes fadeDownIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Apply animation to nav-bar */
  .nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 10;
    margin: 10px 0;
  
    /* Animation */
    opacity: 0;
    animation: fadeDownIn 0.7s ease-out 0.3s forwards;
  }
  
  /* Arrow Buttons */
  .nav-arrow {
    padding: 6px 14px; /* Smaller padding */
    margin: 0 6px;
    background-color: var(--muted);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    line-height: 1;
  }
  
  .nav-arrow:hover {
    background-color: var(--muted-4);
  }
  
  /* Page Number — same height visually as buttons */
  .page-number {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--ink);
    margin: 0 6px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }
  




  


  @media (max-width: 600px) {
  
    .modal-ok-btn {
      font-size: 12px;
      padding: 8px 14px;
      border-radius: 8px;
    }
  }
  
      /* this is for the quotes located on the essay page */

      .quote-container {
        color: var(--ink); /* Deep blue for consistency */
        font-family: 'Georgia', 'Libre Baskerville', serif;
        font-style: italic;
        font-size: 18px;
        font-weight: 500;
        text-align: center;
        display: block;
        margin: 30px auto;
        padding: 10px 20px;
        max-width: 700px;
        visibility: hidden;
        opacity: 0;
        transition: opacity 1.5s ease, visibility 1.5s ease;
        pointer-events: none;
        box-sizing: border-box;
        overflow: hidden;
        line-height: 1.7;
      }
      

    
      .nav-bar-essays {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin: 30px 0;
      }
      
      /* Unified Navigation Buttons */
      .nav-bar-essays .nav-button {
        background-color: var(--muted);
        border: 2px solid var(--ink);
        color: var(--ink);
        padding: 8px 16px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: bold;
        font-family: 'Georgia', 'Libre Baskerville', serif;
        text-decoration: none;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease, transform 0.2s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
      }
      
      /* Hover Effects */
      .nav-bar-essays .nav-button:hover {
        background-color: var(--muted-4);
        transform: scale(1.01);
      }
      


/* === Gallery Page Background === */
.gallery-body {
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
    font-family: 'Georgia', 'Libre Baskerville', serif;
  }
  
  /* === Centered Layout === */
  .gallery-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
  }
  
  /* === Gallery Image Styling === */
  .gallery-image {
    position: relative;
    display: block;
    margin: 20px auto;
    max-width: 50%;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.8s ease, transform 1.8s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); /* Soft modern shadow */
  }
  
  /* === Animation Trigger === */
  .gallery-image.visible {
    opacity: 1;
    transform: translateY(0);
  }
  

/* === Books Page Body === */
.books-body {
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
    color: var(--ink);
    font-family: 'Georgia', 'Libre Baskerville', serif;
  }
  
  /* === Layout for All Book Cards === */
  .books-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    padding: 40px 20px;
  }
  
  /* === Individual Book Card === */
  .book-container {
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    width: 260px;
    padding: 20px;
    border: 2px solid var(--ink);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  .book-container.animated {
    opacity: 1;
    transform: translateY(0);
  }
  
  
  /* === Hover Effect (Subtle) === */
  .book-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  
  /* === Book Cover Image === */
  .books-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
  }
  
  .books-image:hover {
    transform: scale(1.03);
  }
  
  /* === Description Text Under Image === */
  .book-description {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-top: 12px;
    background-color: var(--muted);
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  

  /*this is the search bar found in the book recommendations/library */
/* Search Container (stays right-aligned) */
.search-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(-30px);
    animation-delay: 0.3s;
  }
  
  /* Smoother, cleaner drop-in */
  @keyframes smoothDropIn {
    from {
      opacity: 0;
      transform: translateY(-30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  #searchBar {
    width: 280px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background-color: var(--muted);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  #searchBar:focus {
    border-color: var(--muted-2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    outline: none;
  }

  @media (max-width: 600px) {
    #searchBar {
      width: 220px;
      padding: 8px 12px;
      font-size: 13px;
      border-width: 1.5px;
      border-radius: 6px;
    }
  }
  

  .featured-book-stamp {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    border-radius: 14px;
    padding: 6px 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    animation: slideInStamp 1.2s ease forwards;
    z-index: 1050;
    height: 50px;
    overflow: hidden;
    gap: 24px; /* wider gap between text and image */
  }
  
  .stamp-text {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    max-width: 180px;
    opacity: 0;
    animation: typing 2.2s steps(22) forwards;
    animation-delay: 1.2s;
  }
  
  .stamp-text.with-cursor {
    border-right: 2px solid var(--ink);
    animation: typing 2.2s steps(22) forwards, blink 0.8s step-end infinite alternate;
    animation-delay: 1.2s, 1.2s;
  }
  
  .stamp-image {
    width: 36px;
    height: auto;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    animation: fadeInBook 0.7s ease-out forwards;
    animation-delay: 3s;
    box-shadow: 0 0 6px rgba(25, 34, 49, 0.12), 0 0 0 2px #fcfbf9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  @keyframes fadeInBook {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  .featured-book-stamp:hover .stamp-image {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(25, 34, 49, 0.2);
  }
  
  @keyframes slideInStamp {
    from {
      opacity: 0;
      transform: translateX(-40px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes typing {
    from {
      width: 0;
      opacity: 1;
    }
    to {
      width: 180px;
      opacity: 1;
    }
  }
  
  @keyframes blink {
    50% { border-color: transparent; }
  }
  
  @media (max-width: 600px) {
    .featured-book-stamp {
      height: auto; /* allow content to define height */
      padding: 4px 8px;
      gap: 10px; /* tighter gap */
    }
  
    .stamp-text {
      font-size: 13px;
      max-width: 120px;
      line-height: 1.2;
    }
  
    .stamp-image {
      width: 26px;
      border-radius: 4px;
    }
  }
  
  


/*this is the styling for the actual essays */
/* === Body Background === */
.essay-body {
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
    color: var(--ink);
    margin: 0;
    padding: 0;
  }
  
  /* === Main Essay Container === */
  .essay-main {
    max-width: 820px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
  }

  .essay-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    border-bottom: 2px solid var(--ink);
    display: inline-block;
    padding-bottom: 6px;
    margin: 0 auto 30px auto;
    line-height: 1.4;
    
    /* Animation */
    opacity: 0;
    transform: translateY(-20px);
    animation: titleSlideDown 1s ease-out 0.3s forwards;
  }

  .banner-container {
    text-align: center;
  }
  .essay-title {
    display: inline-block;
    border-bottom: 2px solid var(--ink);
  }
  
  

  @keyframes titleSlideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  
  /* === Text Content === */
  .essay-text {
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 20px;
    text-align: justify;
    color: var(--ink);
  }
  
  /* === Essay Images === */
  .essay-image {
    display: block;
    max-width: 90%;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: none;
  }
  
  /* === Blockquotes === */
  blockquote {
    font-style: italic;
    color: var(--text-3);
    background-color: var(--muted);
    padding: 12px 20px;
    margin: 30px 0;
    border-left: 4px solid var(--ink);
    border-radius: 6px;
  }
  
  /* === Hyperlinks === */
  a {
    color: var(--ink);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
  }
  
  a:hover {
    color: var(--accent-3);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  
  /* === Superscripts and HRs === */
  sup {
    font-size: 0.8rem;
    vertical-align: super;
  }
  
  hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 30px 0;
  }
  .footnote-ref {
    text-decoration: none;
  }
  .footnote-ref:hover {
    text-decoration: underline;
  }
  
  .footnotes {
    margin-top: 1rem;
    padding-left: 1.2rem;
  }
  .footnotes li {
    margin: .35rem 0;
  }
  
  .footnote-back {
    margin-left: .4rem;
    text-decoration: none;
    font-variant-emoji: text; /* Safari/iOS: prefer text glyphs */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* avoid Apple Color Emoji */
  }
  .footnote-back:hover {
    text-decoration: underline;
  }
  
  /* Always insert the text-style arrow before the link text */
  .footnote-back::before {
    content: "\21A9\FE0E"; /* ↩ + FE0E (force text glyph) */
    margin-right: .25em;
  }
  

  
  /* === Responsive Tweaks === */
  @media (max-width: 768px) {
    .essay-main {
      padding: 20px;
    }
  
    .essay-title {
      font-size: 22px;
    }
  
    .essay-text {
      text-align: left;
    }
  
    .essay-image {
      max-width: 100%;
    }
  }
  
  .essay-main {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s ease-out forwards;
  }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  :root{
    --blue-ink:var(--ink);      /* ring + arrow color */
    --ring-size:56px;        /* overall size */
    --ring-thickness:4px;    /* thicker ring */
  }
  
  .scroll-progress{
    position:fixed;
    right:24px;
    bottom:24px;
    width:var(--ring-size);
    height:var(--ring-size);
    z-index:9999;
    pointer-events:none;      /* only the button inside is clickable */
  }
  
  .progress-svg{
    width:100%;
    height:100%;
    transform:rotate(-90deg); /* start at 12 o’clock */
  }
  
  /* Track can be very faint or fully transparent. Pick ONE of these: */
  .track{
    fill:none;
    /* subtle ghost track: */
    stroke: rgba(25,34,49,.15);
    /* or make it invisible:
    stroke: transparent;
    */
    stroke-width: var(--ring-thickness);
  }
  
  .indicator{
    fill:none;
    stroke: var(--blue-ink);
    stroke-width: var(--ring-thickness);
    stroke-linecap: round;
    stroke-dasharray: 0 999;  /* set to full length in JS on load */
    stroke-dashoffset: 0;
  }
  
  /* Transparent click target with centered arrow */
  .to-top-btn{
    position:absolute;
    inset:0;                  /* arrow centered in the ring */
    border:0;
    border-radius:50%;
    background: transparent;  /* no white disc */
    box-shadow:none;          /* no shadow */
    display:grid;
    place-items:center;
    cursor:pointer;
    pointer-events:auto;
  }
  
  /* Chevron-style arrow (stroke, not a filled triangle) */
  .arrow{
    width:22px;
    height:22px;
    color: var(--blue-ink);   /* drives stroke via currentColor */
  }
  
  .to-top-btn:hover .arrow{
    transform: translateY(-1px);
  }
  .to-top-btn:active .arrow{
    transform: translateY(0);
  }

  @media (max-width: 600px){
    :root{
      --ring-size: 48px;        /* a bit smaller on phones */
    }
    .scroll-progress{
      right: max(12px, env(safe-area-inset-right));
      bottom: calc(max(12px, env(safe-area-inset-bottom)) + 4px); /* clear Safari bar */
    }
    .to-top-btn{ min-width: 44px; min-height: 44px; } /* tap target */
  }
/* dissertation page styling */
/* === Dissertation Body === */
.dissertation-body {
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
    color: var(--ink);
    line-height: 1.8;
    margin: 0;
    padding: 0;
  }

  .center-block {
    text-align: center;
  }
  
  .section-break {
    border: none;       /* removes the line */
    height: 0;          /* ensures no fallback line/height */
    margin: 200px auto; /* keeps the big vertical gap */
    width: 60%;         /* doesn’t matter anymore, can remove if you like */
  }
  

  
  /* === Main Content === */
  .dissertation-main {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px 20px;
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  }
  
  /* === Title Block === */
  .dissertation-title {
    text-align: center;
    margin-bottom: 40px;
  }

  .dissertation-header {
    opacity: 0;
    transform: translateY(-30px);
    animation: elegantDropIn 1.2s ease-out forwards;
  }
  
  @keyframes elegantDropIn {
    0% {
      opacity: 0;
      transform: translateY(-30px);
    }
    60% {
      opacity: 1;
      transform: translateY(5px); /* slight overshoot for fluidity */
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .note-pop {position:absolute; z-index:1000; max-width:32ch; padding:.6rem .7rem;
    background: var(--panel-0); color: var(--text); border:1px solid var(--hairline);
    box-shadow: var(--shadow-m); border-radius: .5rem; font-size:.9rem; display:none;}
  
    .copy-cite {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--ink);               /* normal ink colour */
      font-size: 0.95rem;
      line-height: 1;
      padding: 0;                      /* remove boxiness */
      margin-left: 0.4rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: color 0.2s ease, transform 0.12s ease;
    }
    
    .copy-cite:hover {
      color: var(--accent-2);          /* just tint icon */
      transform: scale(1.1);           /* subtle lift */
    }
    
    .copy-cite:active {
      transform: scale(0.95);
    }
    
    .copy-cite:focus-visible {
      outline: none;
      box-shadow: none;                /* no ugly box */
    }
    
    .copy-cite.copied {
      color: #2e7d32; /* green flash on copy */
    }
    

.copy-cite i{
  pointer-events: none;              /* clicks go to button, not icon */
}

/* Keep footnotes tidy when buttons wrap */
.footnotes li{
  display: list-item;
}


  .toc{
    max-width: 800px;
    margin: 2rem auto 3.5rem;   /* centered, no big side margins */
    padding: 0 16px;            /* gentle side padding for small screens too */
  }

.toc-item {
  display: grid;
  grid-template-columns: auto 1fr auto; /* title | dots | page number */
  gap: .5rem;
  align-items: baseline;
  font-size: 16px;
  font-weight: 600;
  margin: .1rem 0;
  color: var(--text-primary);        /* main row text color */
}

.toc-item.sub {
  display: block;                    /* subtitles are plain lines */
  font-size: 14px;
  font-weight: 400;
  margin-left: 1.5rem;               /* indent under parent */
  color: var(--text-2);              /* subtler line color */
}

.toc-link {
  text-decoration: none;
  color: var(--text-primary);
  white-space: normal;         /* allow wrap */
  word-break: break-word;        /* link inherits theme */
}

.toc-link:hover {
  text-decoration: underline;
  color: var(--accent-2);            /* your hover accent */
}

.toc-link:focus-visible {
  outline: 2px solid var(--ring);    /* accessible focus ring */
  outline-offset: 2px;
}

/* dotted leader that stretches between title and page number */
.toc-leader {
  border-bottom: 1px dotted var(--border-2);  /* adapts in dark mode */
  height: 1px;
}

/* right-aligned page number */
.toc-num {
  font-variant-numeric: tabular-nums;
  color: var(--text-3);              /* slightly toned down */
  opacity: .9;
}

/* Narrow screens: remove side squeeze + simplify layout */
@media (max-width: 600px){
  .toc{
    margin: 1.25rem auto 2.5rem;
    padding: 0 12px;
  }
  .toc-item{
    grid-template-columns: 1fr auto;  /* title | number */
    gap: .4rem;
  }
  .toc-leader{ display:none; }        /* hide dots on very small screens */
  .toc-item.sub{ margin-left: 1rem; }
}

  
  .dissertation-title h1,
  .dissertation-title h2 {
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--ink);
    font-size: 26px;
    font-weight: 600;
    border-bottom: 2px solid var(--ink);
    display: inline-block;
    padding-bottom: 6px;
    margin-bottom: 12px;
  }
  
  /* === Section Headings === */
  .dissertation-text h2 {
    font-family: 'Georgia', 'Libre Baskerville', serif;
    color: var(--ink);
    font-size: 20px;
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-2);
    padding-bottom: 4px;
  }
  
  /* === Paragraph Text === */
  .dissertation-text,

  
  .dissertation-text p {
    margin-bottom: 18px;
  }
  
  /* === Bold Sections === */
  .dissertation-text b {
    font-weight: bold;
    color: var(--ink);
  }
  

  .table-of-contents h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--border-2);
    padding-bottom: 4px;
    margin-bottom: 15px;
  }

/* Hide via [hidden] */
#camusTeaser[hidden]{ display:none !important; }

/* === Camus teaser (uses your theme tokens) === */
.camus-teaser{
  position:absolute;
  top:12px; left:50%;
  transform:translateX(-50%) translateY(-8px);
  z-index:9999;

  background:var(--panel-0);
  color:var(--text-primary);
  border-radius:999px;
  border:1px solid var(--hairline);
  box-shadow:var(--shadow-m);

  display:flex; align-items:center;
  padding:6px 10px;
  min-width:0; max-width:fit-content;

  opacity:0; pointer-events:none;

  -webkit-tap-highlight-color:transparent;  /* iOS: no blue tap flash */
  -webkit-text-size-adjust:100%;            /* iOS: prevent zoom-based resizing */
  transition:
    opacity .4s ease,
    transform .4s cubic-bezier(.25,1,.5,1),
    background .22s ease,
    color .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

/* Visible state */
.camus-teaser.is-visible{
  opacity:1;
  transform:translateX(-50%) translateY(0);
  pointer-events:auto;
}

/* Clickable area */
.camus-teaser .teaser-main{
  appearance:none; -webkit-appearance:none; /* iOS: remove native button styling */
  border:0; background:transparent;
  cursor:pointer; outline:none;
  display:flex; align-items:center; gap:8px; padding:0;
  -webkit-tap-highlight-color:transparent;
  -webkit-user-modify:read-only !important; /* iOS: stop auto-linking */
}

/* Title text */
.camus-teaser .teaser-title{
  font-size:13px; font-weight:600; line-height:1; white-space:nowrap;
  color:var(--text-primary);
  -webkit-text-fill-color:var(--text-primary); /* iOS: enforce text color */
  transition:color .22s ease;
}

/* Chip icon (paperclip/letter/etc.) */
.camus-teaser .teaser-icon{
  width:26px; height:26px; border-radius:999px;
  display:inline-grid; place-items:center;
  font-weight:700; font-size:14px; user-select:none;

  /* Use theme tokens so it auto-inverts in dark mode */
  background:var(--ink);     /* chip bg */
  color:var(--text-4);       /* chip fg (white in light, near-black in dark) */
  box-shadow:inset 0 0 0 1px var(--hairline);
  transition:background .22s ease, color .22s ease;
}

/* Hover: tint only (no boxes), subtle invert of chip + accent title */
.camus-teaser.is-visible:hover .teaser-icon{
  background:var(--text-4);
  color:var(--ink);
}
.camus-teaser.is-visible:hover .teaser-title{
  color:var(--accent-2);
  -webkit-text-fill-color:var(--accent-2);
}

/* Accessibility / reduced motion */
@media (prefers-reduced-motion: reduce){
  .camus-teaser{ transition:none; }
}

.camus-teaser.is-visible:hover {
  background: var(--ink);
  color: var(--text-4);
}

/* === Mobile tweak: Camus teaser smaller === */
@media (max-width: 600px){
  .camus-teaser{
    padding: 4px 8px;
    transform: translateX(-50%) translateY(-6px);
  }
  .camus-teaser .teaser-title{
    font-size: 11px;
  }
  .camus-teaser .teaser-icon{
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
}


/* === Camus modal (tokenized) === */
#camusModal.modal {
  position: fixed; inset: 0;
  display: none; /* your JS toggles display */
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(0,0,0,.35), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.35)); /* scrim works in both themes */
  backdrop-filter: blur(2px);
  z-index: 99999;
}

#camusModal .modal-content {
  box-sizing: border-box;
  width: min(760px, 92vw);
  margin: 8vh auto;
  padding: 28px 28px 30px;
  border-radius: 16px;

  /* surfaces + text */
  background: var(--panel-0);      /* light: #fcfbf9 | dark: your panel-0 override */
  color: var(--ink);               /* headings/links inherit; body text set below */

  /* border + shadow */
  border: 1px solid var(--border);
  box-shadow: var(--shadow-l);

  /* keep animation disabled */
  animation: none !important;
}

/* Heading / divider */
#camusModal h2 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: .02em;
  font-weight: 700;
}

#camusModal .camus-rule {
  height: 1px; border: 0; margin: 22px 0 18px;
  background: linear-gradient(to right, transparent, var(--ghost-ink), transparent);
}

/* Body text */
#camusModal .camus-essay {
  line-height: 1.75;
  font-size: 16.5px;
  color: var(--text);              /* light: #333; dark: your text override */
}
#camusModal .camus-essay p { margin: 0 0 14px; }

/* Drop cap keeps currentColor so it follows the text */
#camusModal .camus-essay p:first-of-type::first-letter{
  float:left;
  font-size:3.1em;
  line-height:.85;
  padding-right:.12em;
  margin-top:.05em;

  font-weight:700;
  color: currentColor;
  opacity: 1;
}

/* Footnote link: neutral */
#camusModal .camus-essay .footnote-link{
  color: inherit;
  text-decoration: none;
  font-size: .75em;
  vertical-align: super;
  border: 0;
}
#camusModal .camus-essay .footnote-link:hover{ text-decoration: underline; }

/* Quote block inside modal note */
#camusModal .camus-note blockquote{
  margin: 0 0 10px;
  padding: 10px 16px;
  border-left: 4px solid var(--ghost-ink);  /* subtle divider in both themes */
  color: var(--text-2);                     /* light: #444; dark: softer text */
  font-style: italic;
  position: relative;
}
#camusModal .camus-note blockquote::before{ content:none !important; }
#camusModal .camus-note p{
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* Close button */
#camusModal .close{
  float:right;
  font-size:26px;
  line-height:1;
  color: var(--ink-2);                      /* subtle icon color */
  cursor:pointer;
  padding:2px 6px;
  border-radius:8px;
  transition: background .2s ease, color .2s ease;
}
#camusModal .close:hover{
  background: var(--ghost-ink);
  color: var(--ink);
}




/* project page styling */
.projects-body {
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
    color: var(--ink);
    margin: 0;
    padding: 0;
  }
  
  .projects-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
  }
  
  .project {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: translateY(40px);
    opacity: 0;
    transition: opacity 1.4s ease-out, transform 1.4s ease-out; 
  }
  
  .project.visible {
    transform: translateY(0);
    opacity: 1;
  }
  
  .project-thumbnail {
    width: 100%;
    max-width: 350px;
    object-fit: cover;
    border: none;
    border-radius: 0;
  }
  
  .project-details {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .project-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    font-family: 'Georgia', 'Libre Baskerville', serif;
    display: inline-block;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 4px;
    margin-bottom: 18px;
    display: inline-block;
    align-self: flex-start;
    max-width: fit-content;
  
    /* Optional entrance animation */
    opacity: 0;
    transform: translateY(-15px);
    animation: titleDropIn 0.8s ease-out forwards;
    animation-delay: 0.2s;
  }
  
  @keyframes titleDropIn {
    from {
      opacity: 0;
      transform: translateY(-15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  
  .project-preview {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 20px;
  }
  
  .project-link {
    display: inline-block;
    align-self: flex-start;
    max-width: fit-content;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Georgia', 'Libre Baskerville', serif;
    background-color: var(--muted);
    color: var(--ink);
    padding: 10px 18px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
  }
  
  .project-link:hover {
    background-color: var(--muted-2);
    transform: scale(1.01);
    color: var(--ink);
  }
  
  
  @media (max-width: 768px) {
    .project {
      flex-direction: column;
    }
  
    .project-thumbnail {
      width: 100%;
      height: auto;
    }
  
    .project-title {
      text-align: center;
    }
  
    .project-details {
      padding: 20px;
    }
  }
  @media (max-width: 768px) {
    .project-details {
      display: flex;
      flex-direction: column;
      align-items: center;      /* centre all children horizontally */
      text-align: center;
    }
  
    .project-link {
      /* override the desktop align-self:flex-start */
      align-self: center !important;
      
      /* or, if you prefer margins: */
      /* margin: 0 auto; */
    }

  }

  @media (max-width: 768px) {
    .project-title {
      text-align: center;
      align-self: center !important;
    }
  }

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .project {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

 

    .project-image {
        margin-bottom: 20px;
    }

    

    .project-thumbnail {
        width: 100%;
        max-width: 300px;
        height: auto; /* Maintain aspect ratio */
    }

    .project-details {
        text-align: center;
    }
}


.timeline-body {
  background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
  font-family: 'Georgia', 'Libre Baskerville', serif;
}

.timeline-main {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
  position: relative;
}


.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--ink);
  transform: translateX(-50%);
  z-index: 0;
  opacity: 0;
  animation: lineFadeIn 1.4s ease forwards 0.5s;
}

@keyframes lineFadeIn {
  from {
    opacity: 0;
    height: 0;
  }
  to {
    opacity: 1;
    height: 100%;
  }
}

.timeline-line::before,
.timeline-line::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background-color: var(--ink);
  transform: translateX(-50%);
}

.timeline-line::before {
  top: 0;
}

.timeline-line::after {
  bottom: 0;
}


.timeline-entry {
  position: relative;
  padding: 40px 20px;
  min-height: 120px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}


.timeline-entry:hover {
  transform: scale(1.02);
}
.timeline-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1); /* added scale(1) */
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.timeline-dot:hover {
  transform: translate(-50%, -50%) scale(1.1); /* now includes both translate and scale */
  background-color: var(--ink-2);
}



.timeline-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(25, 34, 49, 0.2);
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0;
  animation: pulse 1.5s ease-out forwards;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}


.timeline-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #192231;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 6px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.timeline-dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}


/* Shared label style */
.timeline-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  color: var(--ink);
  white-space: nowrap;
  z-index: 1;
}

/* === Odd Entries (Right side) === */
.timeline-entry:nth-child(odd) .timeline-dot {
  left: 50%;
  transform: translate(-50%, -50%);
}

.timeline-entry:nth-child(odd) .timeline-label {
  left: calc(50% + 24px);
  text-align: left;
}

/* === Even Entries (Left side) === */
.timeline-entry:nth-child(even) .timeline-dot {
  left: 50%;
  transform: translate(-50%, -50%);
}

.timeline-entry:nth-child(even) .timeline-label {
  right: calc(50% + 24px);
  text-align: right;
}

/* Entry animation */
.timeline-entry.animated {
  animation: fadeInSlideUp 1s ease forwards;
  opacity: 0;
}

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



#modalImage {
  width: 200px;
  height: auto;
  border-radius: 10px;
  margin: 15px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.timeline-tag {
  position: absolute;
  top: calc(50% + 70px); /* push it further below the dot */
  font-size: 20px;
  font-family: 'Georgia', 'Libre Baskerville', serif;
color: var(--ghost-ink);/* slightly bold ghosting */



  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.timeline-entry:nth-child(odd) .timeline-tag {
  left: calc(50% + 120px);  /* further from line */
  text-align: left;
}

.timeline-entry:nth-child(even) .timeline-tag {
  right: calc(50% + 120px); /* same for other side */
  text-align: right;
}

.timeline-tag.tag-visible {
  opacity: 1;
  transform: translateY(-8px); /* gentle float */
}



@media (max-width: 600px) {
  
  .timeline-label {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .timeline-tag {
    font-size: 16px;
    top: calc(50% + 45px);
  }

  .timeline-entry:nth-child(odd) .timeline-tag {
    left: calc(50% + 40px);
    text-align: left;
  }

  .timeline-entry:nth-child(even) .timeline-tag {
    right: calc(50% + 40px);
    text-align: right;
  }

  .timeline-label {
    font-size: 13px;
  }
}
.mini-timeline {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  position: relative;
  margin: 30px 0 10px;
  padding: 40px 0 10px; /* extra space above for the timeline line */
  opacity: 0;
  animation: fadeInTimeline 1.2s ease forwards 0.3s;
}

/* Horizontal timeline line */
.mini-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background-color: var(--ink);
  z-index: 0;
}

/* Point container */
.mini-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
  cursor: pointer;
}

/* Connector line from timeline */
.mini-point::before {
  content: "";
  position: absolute;
  top: -40px; /* Matches the top padding of .mini-timeline */
 /* start from the top timeline line */
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 0;
  background-color: var(--ink);
  animation: dropConnector 0.8s ease forwards;
}

@keyframes dropConnector {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: 14px;
    opacity: 1;
  }
}
.mini-dot {
  width: 12px;
  height: 12px;
  background-color: var(--ink);
  border-radius: 50%;
  position: relative;
  top: -14px;  /* pull it upward toward the timeline */
  margin-bottom: 6px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}


.mini-point:hover .mini-dot {
  transform: scale(1.1);
  background-color: #32425a; /* or any slightly lighter/different clickable shade */
}


/* Label text */
.mini-label {
  font-family: 'Georgia', serif;
  font-size: 14px;
  color: var(--ink);
  text-align: center;
}

/* Subnote below the mini-timeline */
.timeline-link-note {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-2);
}

/* Fade-in effect for the whole timeline */
@keyframes fadeInTimeline {
  to {
    opacity: 1;
  }
}

.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-slide {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-item {
  min-width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 10px 0;
}

.carousel-arrow {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--ink);
  position: absolute;
  top: 20%;
  transform: translateY(-50%);
  z-index: 50;
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
}


.modal-book-image {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 12px auto 16px auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 480px) {
  .carousel-arrow {
    font-size: 1.5rem;
    top: 10%; /* shift lower to align with the image better */
  }

  .left-arrow {
    left: 4px;
  }

  .right-arrow {
    right: 4px;
  }

  .modal-book-image {
    max-width: 150px;
  }
}


.art-banner { 
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  font-family: 'Georgia', 'Libre Baskerville', serif;
  font-size: 14px;
  max-width: 90vw;
  flex-wrap: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.5s ease; }


.art-banner.show {  opacity: 1;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  pointer-events: auto;

 }

.art-text { color: var(--ink);
  flex-grow: 1;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; }

.art-btn { padding: 6px 12px;
  background-color: var(--ink);
  color: var(--text-4) !important;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap; }

  .art-btn:hover {
    background-color: var(--ink-2);
    color: #fcfbf9; /* Keep this line to preserve the text */
  }
  
.art-close {cursor: pointer;
  margin-left: 8px;
  font-size: 16px;
  color: #777;
  flex-shrink: 0; }



#art-modal {  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1200;
  -webkit-overflow-scrolling: touch; }


#art-modal .modal-content { position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(to bottom right, var(--panel-0), var(--panel-1));
  border-radius: 14px;
  padding: 30px 25px;
  width: 90%;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  font-family: 'Georgia', 'Libre Baskerville', serif;
  animation: fadeInModal 0.4s ease-out;
  border: none;
  transition: transform 0.3s ease;}


#art-modal .close-btn { position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #777;
  background: none;
  border: none;
  transition: color 0.3s ease; }

  #art-modal .close-btn:hover {
    color: var(--ink);
  }

#art-modal #modal-message { font-family: 'Georgia', 'Libre Baskerville', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 20px;
  display: inline-block;
  letter-spacing: 0.3px;}

@keyframes fadeInModal {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-width: 600px) {
  .art-banner {
    bottom: 16px;
    padding: 4px 8px;
    gap: 10px;
    font-size: 12px;
    max-width: 75vw;
  }

  .art-text {
    max-width: 50vw;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .art-btn {
    font-size: 10px;
    padding: 4px 8px;
  }

  .art-close {
    font-size: 14px;
  }
}


.content-section {
  padding: 60px 20px;
}

.section-label {
  font-size: 28px;
  font-weight: 600;
  font-family: 'Georgia', serif;
  color: var(--ink);
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  display: inline-block;
}

.content-highlight-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.content-large {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  height: 100%;
}

.content-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.content-large:hover img {
  transform: scale(1.03);
}

.content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  padding: 24px;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0,0,0,0.1));
  font-family: 'Georgia', serif;
  box-sizing: border-box;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background 0.3s ease;
}

.content-overlay h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  display: inline-block;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.content-overlay p {
  margin: 4px 0;
  font-size: 15px;
  color: #f0f0f0;
  transition: color 0.3s ease;
}

.content-large:hover .content-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0,0,0,0.15));
}

.content-large:hover .content-overlay h2,
.content-large:hover .content-overlay p {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.content-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Small content cards with images */
.content-small {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.content-small:hover {
  transform: translateY(-3px);
}

.content-small img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.content-small:hover img {
  transform: scale(1.02);
}

.content-meta {
  padding: 10px;
}

.content-meta h3 {
  margin: 0 0 6px;
  color: #192231;
  font-size: 18px;
  transition: color 0.3s ease;
}

.content-small:hover h3 {
  color: #000;
}

.content-reading-time {
  font-size: 13px;
  color: var(--text-3);
  margin: 2px 0;
}

.content-text-card {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.content-text-card:hover {
  background-color: #f9f9f9;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.content-text-card h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
  transition: color 0.3s ease;
}

.content-text-card:hover h3 {
  color: #000;
}

/* View All button */
.view-all-wrapper {
  margin-top: 40px;
  text-align: center;
}

.view-all-button {
  font-family: 'Georgia', serif;
  font-size: 16px;
  color: var(--ink);
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.view-all-button:hover {
  background: #192231;
  color: white;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .content-highlight-grid {
    grid-template-columns: 1fr;
  }

  .content-large {
    aspect-ratio: auto;
  }

  .content-overlay {
    padding: 16px;
  }

  .content-overlay h2 {
    font-size: 20px;
  }

  .content-overlay p {
    font-size: 14px;
  }

  .content-right {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .content-small {
    flex: 1 1 calc(50% - 6px);
  }

  .content-text-card {
    flex-basis: 100%;
  }
}

/* === Drawings === */
.drawing-slide-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 1rem 0;
}

.drawing-slide-track {
  gap: 1.5rem;
  width: max-content;
  display: inline-flex;    /* important for stable scrollWidth + no wrap */
  white-space: nowrap;     /* belt-and-braces */
  will-change: transform;
}

.drawing-slide-track img {
  height: 160px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.drawing-slide-track img:hover { transform: scale(1.05); }

/* Fade masks */
.drawing-fade-left,
.drawing-fade-right {
  position: absolute; top: 0; bottom: 0; width: 80px;
  pointer-events: none; z-index: 2;
}
.drawing-fade-left  { left: 0;  background: linear-gradient(to right, #f8f8f8, transparent); }
.drawing-fade-right { right: 0; background: linear-gradient(to left,  #f8f8f8, transparent); }

/* === Books === */
.book-slide-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 1rem 0;
}

.book-slide-track {
  gap: 1.5rem;
  width: max-content;
  display: inline-flex;    /* important for stable scrollWidth + no wrap */
  white-space: nowrap;     /* belt-and-braces */
  will-change: transform;
}


.book-slide-track img {
  height: 160px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.book-slide-track img:hover { transform: scale(1.05); }

/* Fade masks */
.book-fade-left,
.book-fade-right {
  position: absolute; top: 0; bottom: 0; width: 80px;
  pointer-events: none; z-index: 2;
}
.book-fade-left  { left: 0;  background: linear-gradient(to right, #f8f8f8, transparent); }
.book-fade-right { right: 0; background: linear-gradient(to left,  #f8f8f8, transparent); }


/* Animate section labels and cards on scroll */
.section-label,
.highlight-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
  will-change: opacity, transform;
}

.section-label.visible,
.highlight-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Preview Section Container === */
.writer-preview-map {
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, var(--bg-0), var(--bg-1));
  border-radius: 12px;
  margin: 60px auto;
  width: 600px;            /* LESS WIDE */
  height:400px;           /* TALLER CANVAS */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.writer-preview-map.visible .map-headline-text {
  opacity: 1;
  transform: translateY(0);
  animation: headlineScroll 10s linear infinite;
  
}

/* Wrapper stays in place */
.map-headline-wrapper {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  overflow: hidden;
  height: 24px;
  z-index: 3;
}

/* Headline that slides */
.map-headline-text {
  display: inline-block;
  white-space: nowrap;
  font-family: 'Georgia', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  animation: headlineScroll 10s linear infinite;
  padding-left: 100%;
  animation: none;
  opacity: 0;
  transform: translateX(0%);
  transition: opacity 0.3s ease;
}

@keyframes headlineScroll {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(0%);
  }
}


/* === SVG Wrapper === */
.svg-container {
  width: 100%;
  padding: 16px;          /* slight breathing room */
  box-sizing: border-box;
}

.svg-container svg {
  width: 100%;
  height: auto;
  display: block;
  fill: var(--ink);           /* your deep blue */
  stroke: var(--ink-2);
  stroke-width: 0.3;

  transform: scale(1.70);  /* increase map size */
  transform-origin: center;
}

.map-pin {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #A61E1E;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(204, 30, 30, 0.5);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 1.2s ease, transform 1.2s ease;
  z-index: 3;
}

/* Pulsing ring */
.map-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(204, 30, 30, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: none;
  pointer-events: none;
}

@keyframes pulse {
  0%   { transform: translate(-50%, -50%) scale(0.9); opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Label */
.pin-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: 'Georgia', serif;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.6s ease;
  white-space: nowrap;
}

/* === Desktop map pin positions === */
.pin-nietzsche {
  top: 32%;
  left: 50.5%;
}

.pin-dostoevsky {
  top: 30%;
  left: 57%;
}

.pin-marquez {
  top: 51%;
  left: 30.5%;
}

@media screen and (max-width: 600px) {
  .writer-preview-map {
    width: 100%;
    height: 280px;
    margin: 40px auto;
    border-radius: 10px;
  }

  .svg-container {
    padding: 12px;
  }

  .svg-container svg {
    transform: scale(1.1); /* slightly smaller map */
  }

  .map-pin {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 6px rgba(204, 30, 30, 0.5);
  }

  .map-pin::after {
    width: 12px;
    height: 12px;
  }

  .pin-label {
    font-size: 0.4rem;
    padding: 1px 4px;
    top: -20px;
  }

  /* === Mobile-specific pin positions === */
  .pin-nietzsche {
    top: 33.5%;
    left: 50.5%;
  }

  .pin-dostoevsky {
    top: 32%;
    left: 55.8%;
  }

  .pin-marquez {
    top: 51%;
    left: 36%;
  }
}

