@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --shell-bg: #07110c;
  --shell-bg-deep: #030905;
  --shell-bg-soft: #0d1812;
  --shell-surface: rgba(13, 28, 19, 0.76);
  --shell-surface-strong: rgba(18, 37, 25, 0.94);
  --shell-surface-alt: rgba(23, 47, 32, 0.92);
  --shell-border: rgba(122, 180, 135, 0.2);
  --shell-border-strong: rgba(156, 220, 152, 0.28);
  --shell-text: #edf7ef;
  --shell-text-soft: #bdd4c2;
  --shell-text-dim: #7d9a86;
  --shell-accent: #76d88f;
  --shell-accent-strong: #d5f58d;
  --shell-accent-soft: rgba(118, 216, 143, 0.14);
  --shell-warning: #ecd97d;
  --shell-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --shell-radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.notes-shell-enabled {
  margin: 0;
  min-height: 100vh;
  padding-top: 112px;
  background:
    radial-gradient(circle at top left, rgba(118, 216, 143, 0.14), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(213, 245, 141, 0.08), transparent 22%),
    radial-gradient(circle at 78% 78%, rgba(98, 165, 106, 0.12), transparent 24%),
    linear-gradient(180deg, #06100b 0%, #08120d 48%, #050b08 100%);
  color: var(--shell-text);
  font-family: "Outfit", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body.notes-shell-enabled::before,
body.notes-shell-enabled::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.notes-shell-enabled::before {
  background:
    radial-gradient(circle at 18% 10%, rgba(118, 216, 143, 0.08), transparent 24%),
    radial-gradient(circle at 82% 84%, rgba(213, 245, 141, 0.08), transparent 22%);
}

body.notes-shell-enabled::after {
  background-image:
    linear-gradient(rgba(146, 190, 152, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 190, 152, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 76%);
}

body.notes-shell-enabled a {
  color: inherit;
  text-decoration: none;
}

body.notes-shell-enabled button,
body.notes-shell-enabled input,
body.notes-shell-enabled select {
  font: inherit;
}

body.notes-shell-enabled main,
body.notes-shell-enabled footer {
  position: relative;
  z-index: 1;
}

.notes-shell-skip-link {
  position: fixed;
  top: -48px;
  left: 24px;
  z-index: 150;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--shell-accent-strong);
  color: #07110c;
  font-weight: 700;
  transition: top 0.2s ease;
}

.notes-shell-skip-link:focus {
  top: 18px;
}

.notes-shell-topbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 28px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--shell-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 25, 17, 0.92), rgba(8, 18, 13, 0.88));
  backdrop-filter: blur(18px);
  box-shadow: var(--shell-shadow);
  z-index: 110;
}

.notes-shell-brand-row,
.notes-shell-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notes-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.notes-shell-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(118, 216, 143, 0.2), rgba(213, 245, 141, 0.22));
  border: 1px solid var(--shell-border-strong);
  color: var(--shell-accent-strong);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.notes-shell-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.notes-shell-brand-copy strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.notes-shell-brand-copy span {
  color: var(--shell-text-dim);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.notes-shell-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.notes-shell-nav a,
.notes-shell-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--shell-text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.notes-shell-nav a:hover,
.notes-shell-nav a:focus-visible,
.notes-shell-btn:hover,
.notes-shell-btn:focus-visible {
  transform: translateY(-1px);
  border-color: var(--shell-border-strong);
  background: rgba(118, 216, 143, 0.08);
  color: var(--shell-text);
  outline: none;
}

.notes-shell-btn-primary {
  background: linear-gradient(135deg, rgba(118, 216, 143, 0.16), rgba(213, 245, 141, 0.14));
  border-color: rgba(166, 228, 155, 0.2);
  color: var(--shell-accent-strong);
}

.notes-shell-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.notes-shell-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.notes-shell-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 6, 0.62);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 108;
}

body.notes-shell-drawer-open .notes-shell-overlay,
body.notes-shell-palette-open .notes-shell-overlay {
  opacity: 1;
  pointer-events: auto;
}

.notes-shell-transition {
  position: fixed;
  inset: 0;
  z-index: 146;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  --glass-origin-x: 50vw;
  --glass-origin-y: 36vh;
}

.notes-shell-transition-pane,
.notes-shell-splinter-layer {
  position: absolute;
  inset: 0;
}

.notes-shell-transition-flash,
.notes-shell-crack-map {
  position: absolute;
}

.notes-shell-transition-pane {
  background:
    linear-gradient(180deg, rgba(8, 16, 12, 0.24), rgba(4, 8, 6, 0.82)),
    radial-gradient(circle at var(--glass-origin-x) var(--glass-origin-y), rgba(216, 255, 224, 0.12), transparent 30%);
  backdrop-filter: blur(0px) saturate(110%);
  opacity: 0;
}

.notes-shell-transition-flash {
  width: 320px;
  height: 320px;
  left: calc(var(--glass-origin-x) - 160px);
  top: calc(var(--glass-origin-y) - 160px);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.84) 0%, rgba(234, 255, 196, 0.34) 18%, rgba(118, 216, 143, 0.14) 40%, rgba(7, 17, 12, 0) 72%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(0.22);
}

.notes-shell-crack-map {
  left: var(--glass-origin-x);
  top: var(--glass-origin-y);
  width: min(112vmax, 1060px);
  height: min(112vmax, 1060px);
  transform: translate(-50%, -50%) scale(0.76) rotate(-4deg);
  opacity: 0;
}

.notes-shell-crack-map svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(225, 255, 234, 0.28));
}

.notes-shell-crack-path {
  fill: none;
  stroke: rgba(245, 255, 248, 0.94);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  opacity: 0;
}

.notes-shell-splinter {
  position: absolute;
  left: var(--glass-origin-x);
  top: var(--glass-origin-y);
  width: 14px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(213, 245, 141, 0.42), rgba(118, 216, 143, 0.08));
  box-shadow: 0 0 20px rgba(218, 255, 230, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.18) rotate(0deg);
  transform-origin: center center;
}

body.notes-shell-transition-active .notes-shell-transition {
  opacity: 1;
  visibility: visible;
}

body.notes-shell-transition-breaking .notes-shell-transition-pane {
  animation: notes-shell-pane-break 560ms cubic-bezier(0.18, 0.7, 0.16, 1) forwards;
}

body.notes-shell-transition-joining .notes-shell-transition-pane {
  opacity: 1;
  animation: notes-shell-pane-join 760ms cubic-bezier(0.2, 0.86, 0.18, 1) forwards;
}

body.notes-shell-transition-breaking .notes-shell-transition-flash {
  animation: notes-shell-flash-break 460ms ease-out forwards;
}

body.notes-shell-transition-joining .notes-shell-transition-flash {
  opacity: 0.4;
  transform: scale(1.28);
  animation: notes-shell-flash-join 760ms ease-out forwards;
}

body.notes-shell-transition-breaking .notes-shell-crack-map {
  animation: notes-shell-crack-map-break 560ms cubic-bezier(0.18, 0.7, 0.16, 1) forwards;
}

body.notes-shell-transition-joining .notes-shell-crack-map {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.02) rotate(0deg);
  animation: notes-shell-crack-map-join 760ms cubic-bezier(0.2, 0.86, 0.18, 1) forwards;
}

body.notes-shell-transition-breaking .notes-shell-crack-path {
  animation: notes-shell-crack-break 520ms ease-out forwards;
}

body.notes-shell-transition-joining .notes-shell-crack-path {
  opacity: 0.84;
  stroke-dashoffset: 0;
  animation: notes-shell-crack-join 720ms ease-out forwards;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(2),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(2) {
  animation-delay: 24ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(3),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(3) {
  animation-delay: 48ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(4),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(4) {
  animation-delay: 72ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(5),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(5) {
  animation-delay: 96ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(6),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(6) {
  animation-delay: 120ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(7),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(7) {
  animation-delay: 144ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(8),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(8) {
  animation-delay: 168ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(9),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(9) {
  animation-delay: 192ms;
}

body.notes-shell-transition-breaking .notes-shell-crack-path:nth-child(10),
body.notes-shell-transition-joining .notes-shell-crack-path:nth-child(10) {
  animation-delay: 216ms;
}

body.notes-shell-transition-breaking .notes-shell-splinter {
  animation: notes-shell-splinter-break 520ms ease-out forwards;
  animation-delay: var(--sd);
}

body.notes-shell-transition-joining .notes-shell-splinter {
  opacity: 0.18;
  animation: notes-shell-splinter-join 760ms ease-out forwards;
  animation-delay: var(--sd);
}

.notes-shell-title-home {
  color: inherit;
  cursor: pointer;
  display: inline-block;
  position: relative;
  text-decoration: none;
  transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.notes-shell-title-home:hover,
.notes-shell-title-home:focus-visible {
  transform: translateY(-2px);
  text-shadow: 0 0 22px rgba(213, 245, 141, 0.2);
  outline: none;
}

@keyframes notes-shell-pane-break {
  0% {
    opacity: 0;
    backdrop-filter: blur(0px) saturate(110%);
  }

  18% {
    opacity: 0.9;
  }

  100% {
    opacity: 1;
    backdrop-filter: blur(10px) saturate(155%);
  }
}

@keyframes notes-shell-pane-join {
  0% {
    opacity: 1;
    backdrop-filter: blur(12px) saturate(160%);
  }

  100% {
    opacity: 0;
    backdrop-filter: blur(0px) saturate(110%);
  }
}

@keyframes notes-shell-flash-break {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }

  16% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.86);
  }
}

@keyframes notes-shell-flash-join {
  0% {
    opacity: 0.58;
    transform: scale(1.36);
  }

  100% {
    opacity: 0;
    transform: scale(0.34);
  }
}

@keyframes notes-shell-crack-map-break {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74) rotate(-6deg);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02) rotate(0deg);
  }
}

@keyframes notes-shell-crack-map-join {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72) rotate(4deg);
  }
}

@keyframes notes-shell-crack-break {
  0% {
    opacity: 0;
    stroke-dashoffset: 280;
  }

  22% {
    opacity: 0.95;
  }

  100% {
    opacity: 0.78;
    stroke-dashoffset: 0;
  }
}

@keyframes notes-shell-crack-join {
  0% {
    opacity: 0.84;
    stroke-dashoffset: 0;
  }

  100% {
    opacity: 0;
    stroke-dashoffset: 280;
  }
}

@keyframes notes-shell-splinter-break {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }

  26% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.14) rotate(var(--sr));
  }
}

@keyframes notes-shell-splinter-join {
  0% {
    opacity: 0.28;
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.04) rotate(var(--sr));
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.22) rotate(0deg);
  }
}

.notes-shell-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(380px, calc(100vw - 32px));
  padding: 24px;
  background: linear-gradient(180deg, rgba(8, 16, 12, 0.98), rgba(9, 20, 14, 0.98));
  border-right: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
  transform: translateX(-102%);
  transition: transform 0.24s ease;
  z-index: 109;
  overflow-y: auto;
}

body.notes-shell-drawer-open .notes-shell-drawer {
  transform: translateX(0);
}

.notes-shell-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.notes-shell-kicker {
  color: var(--shell-text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.notes-shell-drawer h2 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  line-height: 1;
}

.notes-shell-section {
  margin-top: 22px;
}

.notes-shell-section h3 {
  margin: 0 0 10px;
  color: var(--shell-text-dim);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.notes-shell-stack {
  display: grid;
  gap: 10px;
}

.notes-shell-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--shell-border);
  background: rgba(14, 27, 20, 0.72);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.notes-shell-link-card:hover,
.notes-shell-link-card:focus-visible {
  transform: translateX(4px);
  border-color: var(--shell-border-strong);
  background: rgba(21, 40, 29, 0.9);
  outline: none;
}

.notes-shell-link-card strong {
  display: block;
  font-size: 0.98rem;
}

.notes-shell-link-card span {
  color: var(--shell-text-dim);
  font-size: 0.84rem;
}

.notes-shell-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(118, 216, 143, 0.12);
  color: var(--shell-accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.notes-shell-palette {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 100px 16px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 111;
}

body.notes-shell-palette-open .notes-shell-palette {
  opacity: 1;
  pointer-events: auto;
}

.notes-shell-palette-card {
  width: min(760px, 100%);
  border-radius: 28px;
  border: 1px solid var(--shell-border);
  background: linear-gradient(180deg, rgba(12, 24, 17, 0.98), rgba(9, 17, 12, 0.96));
  box-shadow: var(--shell-shadow);
  overflow: hidden;
}

.notes-shell-palette-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--shell-border);
}

.notes-shell-palette-head input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(19, 37, 25, 0.92);
  color: var(--shell-text);
  padding: 14px 16px;
  outline: none;
}

.notes-shell-palette-head input:focus {
  border-color: rgba(118, 216, 143, 0.38);
  box-shadow: 0 0 0 4px rgba(118, 216, 143, 0.12);
}

.notes-shell-palette-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.notes-shell-palette-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--shell-border);
  background: rgba(14, 27, 20, 0.8);
}

.notes-shell-palette-item strong {
  display: block;
  margin-bottom: 2px;
}

.notes-shell-palette-item span {
  color: var(--shell-text-dim);
  font-size: 0.86rem;
}

.notes-shell-palette-tag {
  color: var(--shell-accent-strong);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.notes-shell-palette-empty {
  padding: 18px;
  color: var(--shell-text-dim);
}

.notes-shell-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 105;
}

.notes-shell-fab .notes-shell-btn {
  min-width: 52px;
  justify-content: center;
  padding: 0 16px;
  border-color: var(--shell-border);
  background: rgba(12, 22, 17, 0.9);
  box-shadow: var(--shell-shadow);
}

@media (max-width: 980px) {
  .notes-shell-topbar {
    grid-template-columns: 1fr auto;
  }

  .notes-shell-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  body.notes-shell-enabled {
    padding-top: 98px;
  }

  .notes-shell-topbar {
    width: min(100% - 18px, 1240px);
    gap: 10px;
    padding: 12px 14px;
  }

  .notes-shell-brand-copy span {
    display: none;
  }

  .notes-shell-toolbar .notes-shell-btn span:not(.notes-shell-icon) {
    display: none;
  }

  .notes-shell-toolbar .notes-shell-btn {
    min-width: 42px;
    justify-content: center;
    padding: 0 12px;
  }

  .notes-shell-fab {
    right: 12px;
    bottom: 12px;
  }

  .notes-shell-transition-flash {
    width: 240px;
    height: 240px;
    left: calc(var(--glass-origin-x) - 120px);
    top: calc(var(--glass-origin-y) - 120px);
  }
}
