/* ==========================================================================
   Taleen's Peaceful Pond (v3 — Crisp 3D Blender + Three.js Edition)
   Serene aqua-glass surfaces, warm coral-peach pills, airy editorial rhythm.
   ========================================================================== */

:root {
  --ink: oklch(0.24 0.04 202);
  --ink-soft: oklch(0.37 0.04 200);
  --white-pure: #ffffff;
  --coral: oklch(0.71 0.16 22);
  --coral-hover: oklch(0.66 0.17 22);
  --glass-hero: rgba(212, 249, 245, 0.56);
  --glass-hero-border: rgba(255, 255, 255, 0.52);
  --glass-read: rgba(226, 252, 249, 0.78);
  --glass-read-border: rgba(255, 255, 255, 0.68);
  --tile-bg: rgba(255, 255, 255, 0.54);
  --shadow-soft: 0 14px 36px rgba(9, 76, 82, 0.18);
  --shadow-lift: 0 20px 44px rgba(8, 68, 74, 0.24);
  --radius-card: 22px;
  --radius-pill: 999px;
  --font-serif: "Lora", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: #14868b;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-block-size: 100svh;
  overflow-x: clip;
  background: #14868b;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Re-enable clean selection inside reading content and form fields */
input,
textarea,
.reader-body,
.about-card p {
  user-select: text;
}

/* Full-bleed fixed 3D WebGL pond canvas */
.pond-canvas {
  position: fixed;
  inset: 0;
  inline-size: 100vw;
  block-size: 100dvh;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* Floating Glass Top Nav */
.site-header {
  position: fixed;
  inset-block-start: max(16px, env(safe-area-inset-top));
  inset-inline: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding-inline: 14px;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.top-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4vw, 12px);
  padding: 6px 8px 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(218, 251, 247, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 10px 28px rgba(8, 72, 78, 0.18);
}

.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    background: rgba(255, 255, 255, 0.56);
  }
}

.coral-btn {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: var(--white-pure);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 17px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(212, 82, 72, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.coral-btn--lg {
  padding: 12px 24px;
  font-size: 0.94rem;
}

@media (hover: hover) and (pointer: fine) {
  .coral-btn:hover {
    background: var(--coral-hover);
    transform: translateY(-1px);
  }
}

.coral-btn:active {
  transform: scale(0.97);
}

.coral-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: var(--white-pure);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 16px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(210, 82, 72, 0.22);
}

/* Main Editorial Shell */
.page-shell {
  position: relative;
  z-index: 5;
  inline-size: min(1020px, 100% - 32px);
  margin-inline: auto;
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.38s ease;
}

/* Explore 3D Pond clean view mode */
body.explore-mode .page-shell,
body.explore-mode .site-header {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

body.explore-mode .page-shell * {
  pointer-events: none !important;
}

/* Hero Section */
.hero-section {
  min-block-size: 100svh;
  display: grid;
  place-items: center;
  padding-block: 96px 56px;
}

.hero-stack {
  inline-size: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.15rem, 5vw, 3.65rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--white-pure);
  text-shadow: 0 3px 22px rgba(7, 74, 82, 0.42), 0 1px 4px rgba(7, 74, 82, 0.32);
}

.hero-subtitle {
  margin: 10px 0 34px;
  font-family: var(--font-sans);
  font-size: clamp(0.98rem, 1.8vw, 1.18rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(242, 255, 253, 0.94);
  text-shadow: 0 2px 14px rgba(6, 70, 78, 0.45);
}

.featured-grid {
  inline-size: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* Frosted Aqua-Glass Note Cards */
.note-card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  text-align: left;
  padding: 20px 20px 22px;
  border-radius: var(--radius-card);
  background: var(--glass-hero);
  border: 1px solid var(--glass-hero-border);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s ease,
    background-color 0.24s ease;
}

.note-card .coral-pill {
  inline-size: 100%;
  justify-content: center;
  padding: 7px 14px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card__excerpt {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.56;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card--journal {
  background: var(--glass-read);
  border-color: var(--glass-read-border);
}

@media (hover: hover) and (pointer: fine) {
  .note-card:hover {
    transform: translateY(-4px);
    background: rgba(228, 253, 250, 0.84);
    box-shadow: var(--shadow-lift);
  }
}

.note-card:focus-visible,
.coral-btn:focus-visible,
.nav-link:focus-visible,
.social-row:focus-visible,
.hud-toggle:focus-visible {
  outline: 2.5px solid #ffffff;
  outline-offset: 2px;
}

/* Content Sections */
.content-section {
  padding-block: clamp(64px, 9vh, 108px) 32px;
}

.content-section--last {
  padding-block-end: 84px;
}

.section-head {
  text-align: center;
  margin-block-end: 30px;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  color: var(--white-pure);
  text-shadow: 0 3px 20px rgba(6, 70, 78, 0.48);
}

.section-sub {
  margin: 8px 0 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(238, 255, 253, 0.92);
  text-shadow: 0 2px 12px rgba(6, 70, 78, 0.45);
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.section-actions {
  margin-block-start: 28px;
  display: flex;
  justify-content: center;
}

.section-actions .coral-btn {
  pointer-events: auto;
}

/* Glass Cards (About / Contact / Socials) */
.glass-card {
  pointer-events: auto;
  padding: clamp(22px, 3.2vw, 32px);
  border-radius: 26px;
  background: var(--glass-read);
  border: 1px solid var(--glass-read-border);
  backdrop-filter: blur(16px) saturate(1.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.22);
  box-shadow: var(--shadow-soft);
}

.about-card {
  max-inline-size: 820px;
  margin-inline: auto;
}

.about-lead {
  margin: 18px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.06rem, 1.7vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink);
}

.about-body {
  margin: 0 0 22px;
  font-size: 0.96rem;
  line-height: 1.66;
  color: var(--ink-soft);
}

.about-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-block-start: 20px;
  border-block-start: 1px solid rgba(16, 98, 102, 0.14);
}

.mini-tile {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--tile-bg);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.mini-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.60 0.15 22);
  margin-block-end: 6px;
}

.mini-tile p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.48;
  color: var(--ink);
}

/* Contact & Socials */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-inline-size: 920px;
  margin-inline: auto;
}

.card-intro {
  margin: 16px 0 18px;
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--ink-soft);
}

.pond-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field textarea {
  font-family: var(--font-sans);
  font-size: 16px; /* prevents iOS Safari zoom on focus */
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(18, 102, 108, 0.2);
  border-radius: 14px;
  padding: 11px 14px;
  resize: vertical;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--coral);
  background: #ffffff;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-note {
  font-size: 0.86rem;
  font-weight: 500;
  color: oklch(0.34 0.08 175);
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--tile-bg);
  border: 1px solid rgba(255, 255, 255, 0.76);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .social-row:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.82);
  }
}

.social-icon {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 999px;
  background: rgba(250, 126, 114, 0.16);
  color: oklch(0.58 0.16 22);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex: none;
}

.social-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.social-copy strong {
  font-size: 0.94rem;
  font-weight: 600;
}

.social-copy span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.social-arrow {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer {
  margin-block-start: 42px;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(235, 255, 253, 0.86);
  text-shadow: 0 1px 10px rgba(6, 70, 78, 0.45);
}

/* Subtle bottom-right Explore 3D Pond button */
.hud-toggle {
  position: fixed;
  inset-block-end: max(18px, env(safe-area-inset-bottom));
  inset-inline-end: max(18px, env(safe-area-inset-right));
  z-index: 25;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-pill);
  background: rgba(218, 251, 247, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 15px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(7, 68, 74, 0.22);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .hud-toggle:hover {
    background: rgba(236, 255, 253, 0.9);
    transform: translateY(-1px);
  }
}

/* Native Dialog Modals */
.pond-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-inline-size: min(560px, 100vw - 28px);
  inline-size: 100%;
  overflow: visible;
}

.pond-dialog::backdrop {
  background: rgba(8, 56, 62, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-sheet {
  padding: 24px;
  border-radius: 26px;
  background: rgba(235, 253, 251, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 60px rgba(6, 56, 62, 0.32);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-close {
  inline-size: 34px;
  block-size: 34px;
  border-radius: 999px;
  border: 1px solid rgba(16, 98, 102, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.reader-body {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-wrap;
}

.modal-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.ghost-btn {
  border: 1px solid rgba(16, 98, 102, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 15px;
  cursor: pointer;
}

.ghost-btn--danger {
  color: oklch(0.48 0.17 20);
  border-color: rgba(190, 62, 56, 0.24);
}

/* Undo Delete Toast */
.undo-toast {
  position: fixed;
  inset-block-end: max(22px, env(safe-area-inset-bottom));
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(16, 68, 74, 0.92);
  color: #ffffff;
  font-size: 0.88rem;
  box-shadow: 0 12px 32px rgba(5, 42, 46, 0.34);
}

.undo-btn {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 13px;
  cursor: pointer;
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .featured-grid,
  .journal-grid,
  .about-mini-grid,
  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding-block: 88px 48px;
  }
}

@media (max-width: 520px) {
  .top-nav {
    padding: 5px 6px 5px 10px;
    gap: 2px;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

  .coral-btn {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}
