/* Base Styles */
body {
  background-color: #fafafa;
  color: #111111;
}

/* --- Navbar Hover Effect --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #111111;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover::after,
.active-link::after {
  width: 100%;
}

/* --- INTERACTION: Pure Color Inversion --- */
.interactive-block {
  transition: background-color 0.2s ease, color 0.2s ease;
  will-change: background-color, color;
  border: 1px solid #111111;
}

.interactive-block:hover {
  background-color: #111111;
  color: #fafafa;
  z-index: 10;
  /* Bring to front on hover to hide overlapping borders */
  position: relative;
}

/* Invert children colors on hover */
.interactive-block:hover * {
  color: #fafafa !important;
  border-color: #fafafa !important;
}

/* Arrow Interaction */
.interactive-block:hover .arrow-icon {
  opacity: 1;
  transform: translate(4px, -4px);
  transition: transform 0.2s ease;
}

/* List Item Hover */
.list-item-group:hover .arrow-icon-horizontal {
  transform: translateX(6px);
}

/* --- INTERACTION: Flat Color Inversion (NO LIFT) - Used in About --- */
.interactive-card {
  transition: background-color 0.2s ease, color 0.2s ease;
  will-change: background-color, color;
  border: 1px solid #111111;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.interactive-card:hover {
  background-color: #111111;
  color: #fafafa;
  /* Explicitly ensuring no transform/lift */
  transform: none;
}

/* Invert children colors on hover */
.interactive-card:hover * {
  color: #fafafa !important;
  border-color: #fafafa !important;
}

/* --- INTERACTION: Folder Tab Style (No Underline) - Used in Notas --- */
.note-row {
  transition: all 0.2s ease;
  will-change: background-color;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  position: relative;
  padding-left: 1.5rem;
  /* Space for tab */
}

/* The Tab Indicator */
.note-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0%;
  background-color: #111111;
  transition: height 0.2s ease;
}

.note-row:hover::before {
  height: 70%;
}

.note-row:hover {
  background-color: rgba(17, 17, 17, 0.02);
  /* Subtle grey wash */
}

/* Arrow/Text Reveal Interaction */
.note-row .reveal-on-hover {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.note-row:hover .reveal-on-hover {
  opacity: 1;
  transform: translateX(0);
}

/* Tag styling */
.tag-pill {
  transition: all 0.2s ease;
  border: 1px solid #e5e5e5;
  color: #666;
}

.note-row:hover .tag-pill {
  border-color: #111111;
  color: #111111;
}

/* --- INTERACTION: Card Inversion - Used in Exploraciones --- */
.project-card {
  transition: background-color 0.2s ease, color 0.2s ease;
  will-change: background-color, color;
  border: 1px solid #111111;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  background-color: #111111;
  color: #fafafa;
}

/* Invert children colors on hover */
.project-card:hover * {
  color: #fafafa !important;
  border-color: #fafafa !important;
}

/* Arrow Interaction */
.project-card:hover .arrow-icon {
  opacity: 1;
  transform: translate(4px, -4px);
}

/* Tag styling for Project Card */
.project-card .tag-pill {
  border: 1px solid #111111;
  color: inherit;
}

.project-card:hover .tag-pill {
  border-color: #fafafa;
}

/* Mobile Menu */
#mobile-menu {
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* --- INTERACTION: Folder Tab Style (Updated) - Used in Traducciones --- */
.translation-row {
  transition: all 0.2s ease;
  will-change: background-color;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  position: relative;
  padding-left: 1.5rem;
  /* Space for tab */
}

/* The Tab Indicator */
.translation-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0%;
  background-color: #111111;
  transition: height 0.2s ease;
}

.translation-row:hover::before {
  height: 70%;
}

.translation-row:hover {
  background-color: rgba(17, 17, 17, 0.02);
  /* Subtle grey wash */
}

/* Arrow/Text Reveal Interaction */
.translation-row .reveal-on-hover {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.translation-row:hover .reveal-on-hover {
  opacity: 1;
  transform: translateX(0);
}

/* Tag styling */
.translation-row:hover .tag-pill {
  border-color: #111111;
  color: #111111;
}

/* --- Image Brightness on Hover - Used in Fanzines --- */
.interactive-card:hover img {
  filter: grayscale(100%) contrast(120%);
}

/* --- Filter Button Styles - Used in Archivo --- */
.filter-btn {
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
  opacity: 0.5;
}

.filter-btn:hover {
  opacity: 1;
}

.filter-btn.active {
  opacity: 1;
  border-bottom-color: #111111;
}

/* --- ARCHIVE ROW INTERACTION (Folder Tab Style) - Used in Archivo --- */
.archive-row {
  transition: all 0.2s ease;
  will-change: background-color;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  position: relative;
  padding-left: 1rem;
}

/* The Tab Indicator */
.archive-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #111111;
  transform: scaleY(0);
  transition: transform 0.2s ease;
  transform-origin: center;
}

.archive-row:hover::before {
  transform: scaleY(1);
}

.archive-row:hover {
  background-color: rgba(17, 17, 17, 0.03);
  /* Subtle grey wash */
}

/* Hover Title Effect */
.archive-row:hover .row-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- ESSAY GRID SYSTEM (Used in arts/A VER2...) --- */

/* The main grid for the essay content */
.essay-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: baseline;
}

/* Desktop: 25% Margin | 75% Body */
@media (min-width: 1024px) {
  .essay-grid {
    grid-template-columns: 200px 1fr;
    /* Fixed width for notes, rest for text */
    gap: 3rem;
  }
}

/* Marginalia (Side Notes) style */
.marginalia {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #111;
  /* Stark black */
  opacity: 0.7;
}

@media (min-width: 1024px) {
  .marginalia {
    text-align: right;
    border-right: 1px solid rgba(17, 17, 17, 0.2);
    padding-right: 1.5rem;
    position: sticky;
    top: 100px;
    /* Keeps note visible while reading the paragraph */
  }
}

@media (max-width: 1023px) {
  .marginalia {
    border-left: 2px solid #111;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    background-color: rgba(17, 17, 17, 0.03);
    padding: 0.75rem;
  }
}

/* Main Body Text */
.body-text {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  font-weight: 300;
  color: #111;
}

/* Indentation for blocks without notes to align with the grid */
.offset-block {
  grid-column: 1 / -1;
  /* Default mobile */
}

@media (min-width: 1024px) {
  .offset-block {
    padding-left: calc(200px + 3rem);
    /* 200px note col + 3rem gap */
  }
}

/* Separators - Reduced Padding */
.separator {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
  opacity: 0.4;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.2rem;
}

/* Epigraphs - Smaller Font */
.epigraph {
  margin-bottom: 3rem;
  border-left: 3px solid #111;
  padding-left: 1.5rem;
}

@media (min-width: 1024px) {
  .epigraph {
    margin-left: auto;
    width: 60%;
  }
}

/* --- POEM BLOCK INTERACTION (Folder Tab Style) - Used in arts/poemas2.html --- */
.poem-block {
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  padding: 3rem 0;
  position: relative;
  /* Ensure left padding for the tab indicator */
  padding-left: 1.5rem;
  margin-left: -1.5rem;
  /* Compensate layout */
  margin-right: -1.5rem;
  padding-right: 1.5rem;
}

/* The Tab Indicator */
.poem-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #111111;
  transform: scaleY(0);
  transition: transform 0.2s ease;
  transform-origin: center;
}

.poem-block:hover::before {
  transform: scaleY(1);
}

.poem-block:hover {
  background-color: rgba(17, 17, 17, 0.02);
  /* Subtle wash */
}

/* Poem Text Styles */
.poem-text {
  white-space: pre-line;
  font-size: 1.05rem;
  /* Slightly larger */
  line-height: 1.7;
}

/* Introduction Style */
.intro-box {
  border-left: 2px solid #111;
  padding-left: 2rem;
  margin-bottom: 4rem;
}