/*
Theme Name: Moleskine Notebook
Theme URI: https://example.com/moleskine-notebook
Author: Perplexity
Author URI: https://www.perplexity.ai/
Description: A WordPress block theme that evokes writing in a Moleskine notebook with cream paper, ruled lines, handwritten-style headings, and subtle page details.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: moleskine-notebook
Tags: blog, block-styles, full-site-editing, editor-style, custom-logo
*/

:root {
  --cover: #0f4f57;
  --cover-deep: #062d33;
  --cover-mid: #16626b;
  --paper: #f7eedf;
  --paper-deep: #ece0c8;
  --paper-shadow: #dfd1b7;
  --ink: #221b16;
  --ink-soft: rgba(34, 27, 22, 0.84);
  --line: rgba(87, 117, 156, 0.22);
  --margin-line: rgba(179, 89, 89, 0.38);
  --accent: #f7ead8;
  --bookmark: #2b2b2b;
  --link: #0e5f69;
  --max-content: 1120px;
  --shell-width: calc(100vw - 0.5rem);
  --rule-step: 1.85em;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.08), transparent 20%),
    radial-gradient(circle at 82% 0%, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(135deg, #041a1e, var(--cover) 32%, var(--cover-mid) 62%, var(--cover-deep)) !important;
  color: var(--accent) !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.44rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
  margin: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.08), transparent 28%),
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 8px
    );
  opacity: 0.28;
  mix-blend-mode: soft-light;
}

.wp-site-blocks {
  min-height: 100vh;
  padding: 0.5rem 0 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

main.wp-block-group,
.wp-site-blocks > .wp-block-group,
.wp-site-blocks > main {
  position: relative;
}

h1, h2, h3, h4, h5, h6,
.wp-block-site-title,
.wp-block-post-title {
  font-family: "Caveat", "Brush Script MT", cursive;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: var(--accent);
  transform: rotate(-1deg);
}

p, li, blockquote, cite, figcaption {
  font-family: "Cormorant Garamond", Georgia, serif;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

a:hover,
a:focus-visible {
  color: #083b42;
}

header.wp-block-template-part,
footer.wp-block-template-part,
main {
  max-width: var(--shell-width);
  margin-inline: auto;
}

.notebook-cover,
.notebook-page {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 18px 44px rgba(27, 18, 12, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notebook-cover {
  color: var(--accent);
  background:
    linear-gradient(180deg, rgba(18, 91, 99, 0.98), rgba(6, 45, 51, 0.98));
  border-radius: 28px;
}

.notebook-cover::before {
  content: "";
  position: relative;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(90deg, transparent 0, transparent 18px, rgba(0, 0, 0, 0.18) 18px, rgba(0, 0, 0, 0.18) 20px, transparent 20px);
  opacity: 0.9;
}

.notebook-cover--top,
.notebook-cover--bottom {
  margin-inline: auto;
}

.notebook-cover--top {
  border-radius: 28px 28px 18px 18px;
}

.notebook-cover--bottom {
  border-radius: 18px 18px 28px 28px;
}

.notebook-cover__inner {
  position: absolute;
  padding: 1.8rem 2rem 1.35rem;
  z-index: 1;
}

.notebook-cover--bottom .notebook-cover__inner {
  padding-top: 1.4rem;
  padding-bottom: 1.7rem;
}

.notebook-cover h1,
.notebook-cover h2,
.notebook-cover h3,
.notebook-cover h4,
.notebook-cover h5,
.notebook-cover h6,
.notebook-cover .wp-block-site-title,
.notebook-cover .wp-block-site-tagline,
.notebook-cover .wp-block-navigation a,
.notebook-cover p,
.notebook-cover li,
.notebook-cover cite,
.notebook-cover figcaption {
  color: var(--accent);
}

.notebook-cover .wp-block-site-title {
  font-family: "Special Elite", monospace;
  font-size: 3.15rem;
  line-height: 1;
}

.notebook-cover .wp-block-site-tagline {
  font-family: "Special Elite", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(247, 234, 216, 0.78);
}

.notebook-cover .wp-block-navigation {
  gap: 1.1rem;
}

.notebook-cover .wp-block-navigation a {
  font-family: "Special Elite", monospace;
  font-size: 1rem;
  text-transform: lowercase;
}

.notebook-cover a:hover,
.notebook-cover a:focus-visible {
  color: #ffffff;
}

.notebook-page {
  background:
    linear-gradient(90deg, transparent 0, transparent 66px, var(--margin-line) 66px, var(--margin-line) 68px, transparent 68px),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rule-step) - 1px), var(--line) calc(var(--rule-step) - 1px), var(--line) var(--rule-step)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.44)),
    var(--paper);
  color: var(--ink);
  border-radius: 26px;
  border-color: rgba(74, 58, 44, 0.18);
  --rule-step: 1.85em;
}

.notebook-page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.1rem;
  width: 12px;
  background: linear-gradient(180deg, rgba(92, 74, 56, 0.12), rgba(92, 74, 56, 0.04));
  opacity: 0.55;
  pointer-events: none;
}

.notebook-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 22%, rgba(0, 0, 0, 0.025) 100%);
  pointer-events: none;
}

.notebook-page > * {
  position: relative;
  z-index: 1;
}

.notebook-page {
  padding: 2.5rem 3.4rem 3rem;
}

.notebook-page .wp-block-post-content,
.notebook-page .wp-block-query,
.notebook-page .wp-block-post-template {
  max-width: none;
  margin-inline: auto;
  width: 100%;
}

.notebook-page :is(h1, h2, h3, h4, h5, h6, .wp-block-post-title) {
  color: var(--ink);
}

.notebook-page .wp-block-site-title {
  color: var(--link);
  font-family: "Special Elite", monospace;
  font-size: 3.15rem;
  line-height: 1;
  margin-top: 0;
  margin-bottom: 1rem;
}

.notebook-page .wp-block-post-title a,
.notebook-page h1 a,
.notebook-page h2 a,
.notebook-page h3 a,
.notebook-page h4 a,
.notebook-page h5 a,
.notebook-page h6 a {
  color: var(--link);
  text-decoration-color: rgba(14, 95, 105, 0.42);
}

.notebook-page .wp-block-post-title a:hover,
.notebook-page .wp-block-post-title a:focus-visible,
.notebook-page h1 a:hover,
.notebook-page h1 a:focus-visible,
.notebook-page h2 a:hover,
.notebook-page h2 a:focus-visible,
.notebook-page h3 a:hover,
.notebook-page h3 a:focus-visible,
.notebook-page h4 a:hover,
.notebook-page h4 a:focus-visible,
.notebook-page h5 a:hover,
.notebook-page h5 a:focus-visible,
.notebook-page h6 a:hover,
.notebook-page h6 a:focus-visible {
  color: #084b53;
  text-decoration-color: rgba(8, 75, 83, 0.76);
}

.wp-block-navigation {
  gap: 1.15rem;
}

.wp-block-navigation a {
  font-size: 1rem;
}

.wp-block-post-content,
.wp-block-query,
.taxonomy-category .wp-block-query,
.archive .wp-block-query {
  max-width: none;
  margin-inline: auto;
  width: 100%;
}

.wp-block-post-featured-image img,
.wp-block-image img {
  border-radius: 6px;
  border: 1px solid rgba(85, 68, 49, 0.18);
  box-shadow: 0 8px 18px rgba(77, 58, 35, 0.12);
}

.wp-block-quote,
blockquote {
  border-left: 3px solid rgba(85, 68, 49, 0.25);
  padding-left: 1rem;
  font-style: italic;
  color: #40352b;
}

.wp-block-button__link {
  background: var(--accent);
  color: #f8f3e7;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-family: "Special Elite", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wp-block-separator {
  border-color: rgba(85, 68, 49, 0.2);
}

.wp-block-pullquote {
  border-top: 1px solid rgba(85, 68, 49, 0.2);
  border-bottom: 1px solid rgba(85, 68, 49, 0.2);
}

.notebook-footer {
  padding: 1.5rem 2rem 2rem;
  color: rgba(247, 234, 216, 0.82);
  font-size: 0.95rem;
}

.post-card {
  position: relative;
  margin-bottom: 1.45rem;
  padding: 1.9rem 1.7rem 2rem 2.35rem;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.84), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(226, 215, 200, 0.46), transparent 26%),
    radial-gradient(circle at 28% 78%, rgba(217, 205, 188, 0.42), transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(229, 219, 205, 0.34), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 240, 229, 0.8));
  border: 1px solid rgba(92, 73, 56, 0.12);
  border-radius: 18px 22px 18px 18px;
  box-shadow: 0 12px 24px rgba(77, 58, 35, 0.08);
  transform: rotate(var(--page-tilt, 0deg));
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(142, 116, 90, 0.08), transparent 16%),
    radial-gradient(circle at 78% 16%, rgba(142, 116, 90, 0.06), transparent 14%),
    radial-gradient(circle at 66% 82%, rgba(142, 116, 90, 0.05), transparent 18%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 42%, rgba(176, 153, 127, 0.06) 70%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.95;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.post-card:nth-child(odd) {
  --page-tilt: -0.4deg;
}

.post-card:nth-child(even) {
  --page-tilt: 0.35deg;
}

.post-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.03), transparent);
  opacity: 0.45;
}

.post-card:last-child {
  margin-bottom: 0;
}

.post-card .wp-block-post-title {
  margin-top: 0;
  font-size: 3rem;
}

.post-card .wp-block-post-title a {
  color: var(--ink);
  text-decoration-color: rgba(34, 27, 22, 0.48);
}

.post-card .wp-block-post-title a:hover,
.post-card .wp-block-post-title a:focus-visible {
  color: #16110d;
  text-decoration-color: rgba(34, 27, 22, 0.78);
}

.post-card .wp-block-post-excerpt {
  margin-bottom: 0;
}

.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms,
.wp-block-site-tagline {
  font-size: 1rem;
}

.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms,
.wp-block-site-tagline {
  font-family: "Special Elite", monospace;
  letter-spacing: 0.03em;
  color: rgba(34, 27, 22, 0.9);
}

input, textarea, select {
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(85, 68, 49, 0.24);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

@media (max-width: 780px) {
  body {
    font-size: 1.08rem;
  }

  .wp-site-blocks {
    padding-top: 0.25rem;
    gap: 0.8rem;
  }

  .notebook-cover__inner,
  .notebook-page,
  .notebook-footer {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .notebook-page {
    padding-top: 1.6rem;
    padding-bottom: 2rem;
  }

  .notebook-cover__inner {
    padding-top: 1.35rem;
    padding-bottom: 1.15rem;
  }

  .notebook-page,
  .notebook-cover {
    border-radius: 20px;
  }

  .post-card {
    padding-left: 1.7rem;
    padding-right: 1rem;
  }

  .post-card::before {
    left: 0.8rem;
  }
}
