/* ============================================================
   luseen.co — Notebook (blog index) styles
   ============================================================ */


/* ───────────── PAGE HEADER ───────────── */
.page-header {
  padding: 100px 48px 60px;
  position: relative;
  overflow: hidden;
}

.page-title {
  font-family: var(--display);
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-weight: 400;
  opacity: 0;
  overflow: visible;
  animation: fadeUp 1s 0.3s var(--ease-out-quart) forwards;
}
.page-title em { font-style: italic; font-weight: 300; color: var(--red); }
.page-title .blue-mark { color: var(--blue); }

.typewriter-word {
  font-style: italic;
  font-weight: 300;
  color: var(--red);
}
.typewriter-cursor {
  display: inline-block;
  font-style: normal;
  font-weight: 300;
  color: var(--blue);
  animation: cursorBlink 0.8s step-end infinite;
  margin-left: 0.04em;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.page-rotator {
  display: inline-block;
  height: 1.3em;
  overflow-y: clip;
  overflow-x: visible;
  vertical-align: bottom;
  position: relative;
  padding-right: 0.12em;
}
.page-rotator-inner {
  display: flex;
  flex-direction: column;
  animation: rotateWords 10s infinite;
}
.page-rotator-inner span {
  display: block;
  line-height: 1;
  height: 1em;
  font-style: italic;
  font-weight: 300;
}
.page-rotator-inner .pr1 { color: var(--red); }
.page-rotator-inner .pr2 { color: var(--blue); }
.page-rotator-inner .pr3 { color: var(--ink); }
.page-rotator-inner .pr4 { color: var(--red); }
@keyframes rotateWords {
  0%,  22% { transform: translateY(0); }
  25%, 47%  { transform: translateY(-1em); }
  50%, 72%  { transform: translateY(-2em); }
  75%, 97%  { transform: translateY(-3em); }
  100%      { transform: translateY(-4em); }
}

.page-eyebrow {
  color: var(--ink);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.1s ease forwards;
}
.page-eyebrow .line { flex: 0 0 60px; width: auto; height: 1px; background: var(--ink); }

.page-intro {
  max-width: 600px;
  margin-top: 48px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}
.page-intro strong { color: var(--ink); font-weight: 600; }

/* Floating shapes in header */
.floating-shape { position: absolute; pointer-events: none; }
.floating-shape.circle-big {
  top: 15%; right: 8%;
  width: 220px; height: 220px;
  border: 2px solid var(--red);
  border-radius: 50%;
  animation: floatSlow 9s ease-in-out infinite;
}
.floating-shape.sq {
  top: 55%; right: 22%;
  width: 60px; height: 60px;
  background: var(--blue);
  animation: floatSlow 11s ease-in-out infinite reverse;
}
.floating-shape.dot {
  top: 30%; right: 32%;
  width: 16px; height: 16px;
  background: var(--red);
  border-radius: 50%;
  animation: floatSlow 7s ease-in-out infinite;
}
@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  33%      { transform: translate(-20px, -30px) rotate(10deg); }
  66%      { transform: translate(15px, 20px) rotate(-5deg); }
}


/* ───────────── FILTER BAR ───────────── */
.filter-bar {
  padding: 40px 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 32px;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--ink);
  transition: all 0.25s;
}
.filter-chip:hover { border-color: var(--ink); }
.filter-chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.filter-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.filter-count strong { color: var(--ink); font-weight: 600; }


/* ───────────── NOTEBOOK CANVAS ───────────── */
.notebook {
  padding: 100px 48px 140px;
  position: relative;
  min-height: 100vh;
}
.notebook::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(10,10,10,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.5;
}
.notebook-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  row-gap: 48px;
}

/* Note cards — floating */
.note {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px;
  cursor: pointer;
  transition: box-shadow 0.4s ease, border-color 0.3s ease;
  color: inherit;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* Continuous floating animation — staggered per card */
.note.float-a { animation: floatA 7s ease-in-out infinite; }
.note.float-b { animation: floatB 9s ease-in-out infinite; }
.note.float-c { animation: floatC 8s ease-in-out infinite; }
.note.float-d { animation: floatD 10s ease-in-out infinite; }
.note.float-e { animation: floatE 11s ease-in-out infinite; }

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) rotate(-1deg); }
  50%      { transform: translate(4px, -10px) rotate(0.5deg); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) rotate(0.8deg); }
  50%      { transform: translate(-6px, -8px) rotate(-0.5deg); }
}
@keyframes floatC {
  0%, 100% { transform: translate(0, 0) rotate(-0.5deg); }
  50%      { transform: translate(5px, -12px) rotate(0.8deg); }
}
@keyframes floatD {
  0%, 100% { transform: translate(0, 0) rotate(1.2deg); }
  50%      { transform: translate(-4px, -6px) rotate(-0.3deg); }
}
@keyframes floatE {
  0%, 100% { transform: translate(0, 0) rotate(-0.8deg); }
  50%      { transform: translate(3px, -14px) rotate(0.4deg); }
}

.note:hover {
  animation-play-state: paused;
  border-color: var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
  z-index: 10;
}

/* Size variants */
.note.size-lg   { grid-column: span 6; padding: 48px; }
.note.size-md   { grid-column: span 4; }
.note.size-sm   { grid-column: span 4; }
.note.size-wide { grid-column: span 8; }

/* Offsets for collage feel */
.note.offset-down { margin-top: 60px; }
.note.offset-up   { margin-top: -20px; }

/* Note content */
.note-category {
  align-self: flex-start;
  margin-bottom: 24px;
}
.note-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  margin-bottom: 20px;
  display: block;
}
.note h3 {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: 16px;
}
.note.size-lg h3   { font-size: 48px; margin-bottom: 24px; }
.note.size-wide h3 { font-size: 38px; }
.note.size-sm h3   { font-size: 24px; }
.note h3 em { font-style: italic; font-weight: 300; }
.note h3 em.red  { color: var(--red); }
.note h3 em.blue { color: var(--blue); }

.note p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 28px;
  flex: 1;
}
.note.size-lg p { font-size: 17px; margin-bottom: 40px; }
.note.size-sm p { font-size: 14px; margin-bottom: 20px; }

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.note-meta .sep { color: var(--red); margin: 0 8px; }

.note-arrow {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}
.note:hover .note-arrow {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  transform: rotate(-45deg);
}

.note-visual {
  height: 180px;
  margin: -48px -48px 32px;
  background: var(--paper-warm);
  position: relative;
  overflow: hidden;
}
.note-visual svg { width: 100%; height: 100%; }

/* Dark variant */
.note.quote { background: var(--ink); color: var(--paper); border: none; }
.note.quote .note-num { color: rgba(250,250,247,0.5); }
.note.quote h3 { font-style: italic; font-weight: 300; font-size: 36px; }
.note.quote p { color: rgba(250,250,247,0.7); }
.note.quote .note-meta { color: rgba(250,250,247,0.5); border-top: 1px solid rgba(250,250,247,0.15); }
.note.quote .pill.outline { color: var(--paper); border-color: var(--paper); }
.note.quote .note-arrow { border-color: var(--paper); color: var(--paper); }

/* Red variant */
.note.accent-red { background: var(--red); color: var(--paper); border: none; }
.note.accent-red .note-num { color: rgba(250,250,247,0.6); }
.note.accent-red p { color: rgba(250,250,247,0.85); }
.note.accent-red .note-meta { color: rgba(250,250,247,0.7); border-top: 1px solid rgba(250,250,247,0.25); }
.note.accent-red .pill.outline { color: var(--paper); border-color: var(--paper); }
.note.accent-red .note-arrow { border-color: var(--paper); color: var(--paper); }
.note.accent-red:hover { box-shadow: 12px 12px 0 var(--ink); }

/* Loose background shapes */
.canvas-shape { position: absolute; pointer-events: none; z-index: 1; }
.canvas-shape.c1 {
  top: 12%; left: 5%;
  width: 70px; height: 70px;
  border: 2px solid var(--red);
  border-radius: 50%;
  animation: drift1 14s ease-in-out infinite;
}
.canvas-shape.c2 {
  top: 45%; right: 3%;
  width: 40px; height: 40px;
  background: var(--blue);
  animation: drift2 16s ease-in-out infinite;
}
.canvas-shape.c3 {
  bottom: 25%; left: 8%;
  width: 24px; height: 24px;
  background: var(--red);
  border-radius: 50%;
  animation: drift1 12s ease-in-out infinite reverse;
}
.canvas-shape.c4 {
  top: 70%; right: 12%;
  width: 50px; height: 50px;
  border: 2px solid var(--blue);
  animation: drift2 18s ease-in-out infinite reverse;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50%      { transform: translate(40px, -30px) rotate(180deg); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50%      { transform: translate(-30px, 40px) rotate(-90deg); }
}

/* Pull quote divider */
.pull-quote {
  grid-column: span 12;
  padding: 80px 40px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  position: relative;
}
.pull-quote::before, .pull-quote::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
}
.pull-quote::before { top: 0; background: var(--red); }
.pull-quote::after  { bottom: 0; background: var(--blue); }
.pull-quote em { color: var(--red); font-style: italic; }
.pull-quote .attribution {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-style: normal;
  display: inline-block;
  margin-top: 24px;
}


/* ───────────── PAGINATION ───────────── */
.pagination {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
}
.pag-info {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pag-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
  font-family: var(--body);
}
.pag-btn:hover { background: var(--red); }


/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 1000px) {
  .notebook-inner { grid-template-columns: repeat(6, 1fr); }
  .note.size-lg { grid-column: span 6; padding: 32px; }
  .note.size-md, .note.size-sm { grid-column: span 3; }
  .note.size-wide { grid-column: span 6; }
  .note.offset-down, .note.offset-up { margin-top: 0; }
}
@media (max-width: 700px) {
  .page-header { padding: 60px 24px 40px; }
  .page-intro { font-size: 16px; }
  .filter-bar { padding: 32px 24px 0; flex-direction: column; align-items: flex-start; gap: 16px; }
  .notebook { padding: 60px 24px 80px; }
  .notebook-inner { grid-template-columns: 1fr; gap: 16px; }
  .note.size-lg, .note.size-md, .note.size-sm, .note.size-wide { grid-column: span 1; padding: 28px; }
  .note.size-lg h3 { font-size: 32px; }
  .note h3 { font-size: 24px; }
  .note-visual { margin: -28px -28px 24px; height: 140px; }
  .pull-quote { padding: 60px 24px; }
  .pagination { padding: 32px 24px 0; flex-direction: column; gap: 20px; }
  .floating-shape, .canvas-shape { display: none; }

  /* Disable floating on mobile */
  .note.float-a, .note.float-b, .note.float-c, .note.float-d, .note.float-e {
    animation: none;
  }
}
