/* =====================================================================
   MY NOTES — school-paper design system
   ===================================================================== */

/* ── Index page: Composition notebook cover ── */
.notes-cover {
  background: linear-gradient(160deg, #1a1a2e 0%, #0f0f1f 40%, #1c1c3a 100%);
  background-image:
    linear-gradient(160deg, #1a1a2e 0%, #0f0f1f 40%, #1c1c3a 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 8px);
  color: #e8e4d9;
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}

.notes-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 6px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 6px);
  pointer-events: none;
}

.notes-cover-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.notes-cover-label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  background: #f5f2e8;
  color: #1a1a2e;
  border-radius: 4px;
  padding: 18px 28px 20px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.35), inset 0 0 0 1px rgba(180,165,130,0.5);
  transform: rotate(-0.5deg);
  max-width: 480px;
}

.notes-cover-label-eyebrow {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a7a5a;
  margin: 0;
}

.notes-cover-label h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}

.notes-cover-label p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: #5a4e38;
  line-height: 1.5;
}

.notes-cover-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-top: 4px;
}

.notes-cover-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notes-cover-stat strong {
  font-size: 1.6rem;
  font-weight: 900;
  color: #f5f2e8;
  line-height: 1;
}

.notes-cover-stat span {
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232,228,217,0.55);
}

/* ── Index page: Notes grid ── */
.notes-section {
  padding: clamp(40px, 6vw, 72px) 0;
}

.notes-section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
}

.notes-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.4rem;
}

.notes-section-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Note card (index card style) ── */
.note-card {
  position: relative;
  background: #faf9f0;
  background-image: repeating-linear-gradient(transparent, transparent 23px, rgba(147,188,237,0.55) 23px, rgba(147,188,237,0.55) 24px);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 6px 24px rgba(0,0,0,0.07), inset 0 0 0 1px rgba(190,175,140,0.4);
  padding: 0;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.note-card:hover {
  transform: translateY(-3px) rotate(0.3deg);
  box-shadow: 0 6px 20px rgba(0,0,0,0.13), 0 12px 40px rgba(0,0,0,0.09);
}

.note-card-tab {
  height: 6px;
  width: 100%;
  flex-shrink: 0;
}

.note-card-tab--linux  { background: #16a34a; }
.note-card-tab--terminal { background: #059669; }
.note-card-tab--general { background: #2563eb; }
.note-card-tab--shortcuts { background: #7c3aed; }
.note-card-tab--reference { background: #d97706; }

.note-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-card-category {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.note-card-category--linux    { color: #16a34a; }
.note-card-category--general  { color: #2563eb; }
.note-card-category--shortcuts { color: #7c3aed; }
.note-card-category--reference { color: #d97706; }

.note-card-date {
  font-size: 0.72rem;
  color: #8a7a62;
  margin-left: auto;
}

.note-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.3;
  color: #1a1510;
}

.note-card-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #5a5040;
  line-height: 1.6;
}

.note-card-footer {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.78rem;
  font-weight: 850;
  color: #2563eb;
}

/* ── Empty state card ── */
.note-card-empty {
  background: transparent;
  background-image: none;
  border: 2px dashed var(--line);
  border-radius: 3px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  padding: 28px;
  text-align: center;
}

.note-card-empty:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--primary);
}

.note-card-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 300;
}

.note-card-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── Note page layout ── */
.note-page-shell {
  width: min(860px, calc(100% - 32px));
  margin: 48px auto 80px;
}

.note-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 120ms;
}

.note-page-back:hover { color: var(--primary); }

.note-page-back::before {
  content: '‹';
  font-size: 1.1rem;
  line-height: 1;
}

/* ── The paper itself ── */
.note-paper {
  position: relative;
  background-color: #faf9f0;
  background-image:
    linear-gradient(90deg,
      transparent 55px,
      rgba(218, 88, 88, 0.5) 55px,
      rgba(218, 88, 88, 0.5) 57px,
      transparent 57px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 31px,
      rgba(147, 188, 237, 0.65) 31px,
      rgba(147, 188, 237, 0.65) 32px
    );
  background-attachment: local;
  padding: 32px 48px 64px 100px;
  border-radius: 2px;
  box-shadow:
    2px 3px 0 #e8e0cc,
    4px 6px 0 #ddd5bc,
    0 8px 32px rgba(0,0,0,0.14),
    0 2px 8px rgba(0,0,0,0.10);
  line-height: 32px;
}

/* hole-punch strip */
.note-paper::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: #ede9d6;
  background-image:
    radial-gradient(circle at 24px 10%, #f7faff 11px, #c0b898 13px, transparent 14px),
    radial-gradient(circle at 24px 50%, #f7faff 11px, #c0b898 13px, transparent 14px),
    radial-gradient(circle at 24px 90%, #f7faff 11px, #c0b898 13px, transparent 14px);
  border-right: 2px solid rgba(185,170,135,0.6);
  border-radius: 2px 0 0 2px;
  pointer-events: none;
  z-index: 1;
}

/* ── Content inside the paper ── */
.note-paper h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 900;
  line-height: 64px; /* 2 × 32px so it sits on lines */
  margin: 0 0 0;
  color: #1a1510;
  letter-spacing: -0.02em;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px;
  line-height: 32px;
}

.note-category-badge {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 3px;
}

.note-category-badge--linux {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.note-category-badge--general {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.note-date {
  font-size: 0.8rem;
  color: #8a7a62;
}

.note-paper h2 {
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 32px;
  margin: 32px 0 0;
  color: #2a2010;
  border-bottom: 2px solid rgba(218, 88, 88, 0.3);
  padding-bottom: 0;
}

.note-paper p {
  margin: 0;
  font-size: 0.97rem;
  color: #2a2010;
  line-height: 32px;
}

.note-paper ul,
.note-paper ol {
  margin: 0;
  padding-left: 24px;
}

.note-paper li {
  font-size: 0.97rem;
  color: #2a2010;
  line-height: 32px;
}

/* ── Shortcut table ── */
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
}

.shortcut-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a7a62;
  padding: 0 12px 0 0;
  line-height: 32px;
  border-bottom: 1px solid rgba(218, 88, 88, 0.3);
}

.shortcut-table tbody td {
  padding: 0 12px 0 0;
  line-height: 32px;
  vertical-align: middle;
  color: #2a2010;
  border-bottom: none;
}

.shortcut-table tbody tr:last-child td { border-bottom: none; }

/* ── Keyboard key badge ── */
.key {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 7px 4px;
  border-radius: 5px;
  border: 1px solid #c4b89a;
  background: linear-gradient(to bottom, #f8f4ec 0%, #ede7d8 100%);
  color: #2a1e0a;
  box-shadow: 0 2px 0 #b8a882, 0 3px 4px rgba(0,0,0,0.12);
  vertical-align: middle;
  white-space: nowrap;
  margin: 0 2px;
}

.key-sep {
  display: inline-block;
  color: #8a7a62;
  font-size: 0.78rem;
  margin: 0 3px;
  vertical-align: middle;
}

/* ── Code block on paper ── */
.note-code-block {
  position: relative;
  background: #ffffff;
  border: 1px solid #ddd5bc;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.06);
  margin: 4px 0;
  overflow: auto;
}

.note-code-block-label {
  display: block;
  padding: 6px 16px 5px;
  background: #f0ece0;
  border-bottom: 1px solid #ddd5bc;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7a62;
  border-radius: 6px 6px 0 0;
}

.note-code-block pre {
  margin: 0;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #1a1510;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow-x: auto;
  white-space: pre;
}

/* ── Note paper divider ── */
.note-divider {
  border: none;
  height: 32px;
  margin: 0;
}

/* ── Dark mode overrides ── */
[data-theme="dark"] .notes-cover {
  background: linear-gradient(160deg, #0a0a18 0%, #06060f 40%, #0d0d22 100%);
}

[data-theme="dark"] .notes-cover-label {
  background: #1a1e2e;
  color: #d4cfbf;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.6), inset 0 0 0 1px rgba(80,90,130,0.4);
}

[data-theme="dark"] .notes-cover-label h1 { color: #d4cfbf; }
[data-theme="dark"] .notes-cover-label-eyebrow { color: #6878a8; }
[data-theme="dark"] .notes-cover-label p { color: #8a94b8; }

[data-theme="dark"] .note-card {
  background: #0f1a2e;
  background-image: repeating-linear-gradient(transparent, transparent 23px, rgba(40,65,110,0.7) 23px, rgba(40,65,110,0.7) 24px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 6px 24px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(50,70,120,0.35);
}

[data-theme="dark"] .note-card-title { color: #d4cfbf; }
[data-theme="dark"] .note-card-desc  { color: #8a94a8; }
[data-theme="dark"] .note-card-date  { color: #5a6484; }
[data-theme="dark"] .note-card-footer { color: #60a5fa; }

[data-theme="dark"] .note-paper {
  background-color: #0f1a2e;
  background-image:
    linear-gradient(90deg,
      transparent 55px,
      rgba(180, 60, 60, 0.4) 55px,
      rgba(180, 60, 60, 0.4) 57px,
      transparent 57px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 31px,
      rgba(40, 65, 110, 0.8) 31px,
      rgba(40, 65, 110, 0.8) 32px
    );
  box-shadow:
    2px 3px 0 #0a1020,
    4px 6px 0 #070c18,
    0 8px 32px rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.4);
}

[data-theme="dark"] .note-paper::before {
  background: #0c1525;
  background-image:
    radial-gradient(circle at 24px 10%, #061225 11px, #1e2d45 13px, transparent 14px),
    radial-gradient(circle at 24px 50%, #061225 11px, #1e2d45 13px, transparent 14px),
    radial-gradient(circle at 24px 90%, #061225 11px, #1e2d45 13px, transparent 14px);
  border-right-color: rgba(40,65,110,0.5);
}

[data-theme="dark"] .note-paper h1 { color: #d4cfbf; }
[data-theme="dark"] .note-paper h2 { color: #c4c0b0; border-bottom-color: rgba(180,60,60,0.25); }
[data-theme="dark"] .note-paper p,
[data-theme="dark"] .note-paper li,
[data-theme="dark"] .shortcut-table tbody td { color: #b8c0d0; }
[data-theme="dark"] .note-meta .note-date { color: #5a6484; }
[data-theme="dark"] .note-category-badge--linux {
  background: rgba(21,128,61,0.15);
  color: #4ade80;
  border-color: rgba(74,222,128,0.3);
}
[data-theme="dark"] .note-category-badge--general {
  background: rgba(37,99,235,0.15);
  color: #60a5fa;
  border-color: rgba(96,165,250,0.3);
}
[data-theme="dark"] .shortcut-table thead th { color: #5a6484; border-bottom-color: rgba(180,60,60,0.2); }
[data-theme="dark"] .key {
  border-color: #2a3a5a;
  background: linear-gradient(to bottom, #1a2640 0%, #131e32 100%);
  color: #b8c0d0;
  box-shadow: 0 2px 0 #0a1020, 0 3px 4px rgba(0,0,0,0.4);
}
[data-theme="dark"] .key-sep { color: #4a5a78; }
[data-theme="dark"] .note-code-block {
  background: #0a1020;
  border-color: #1e2d45;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
}
[data-theme="dark"] .note-code-block-label {
  background: #0d1828;
  border-bottom-color: #1e2d45;
  color: #4a5a78;
}
[data-theme="dark"] .note-code-block pre { color: #b8c8e0; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .note-paper {
    padding: 32px 20px 48px 68px;
  }
  .note-paper::before { width: 36px; }
  .notes-grid { grid-template-columns: 1fr; }
  .shortcut-table { font-size: 0.82rem; }
}

.note-category-badge--void{background:color-mix(in srgb,#7c3aed,transparent 84%);color:#7c3aed;border-color:color-mix(in srgb,#7c3aed,transparent 60%)}
.note-card-tab--void{background:#7c3aed}
.note-intro{margin:0 0 8px;color:var(--muted);font-size:0.97rem;line-height:1.7}
