/* ============================================================
   Selina — Sakura Manuscript
   Refined kawaii × Japanese stationery × literary depth.
   Hobonichi Techo meets a Tokyo indie bookshop.
   Typography: Playfair Display + Lora + Noto Serif JP
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400;1,500&family=Noto+Serif+JP:wght@300;400&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ── Keyframes ── */
@keyframes ink-appear {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes petal-sway {
  0%, 100% { transform: rotate(-3deg) translateX(0); }
  50%       { transform: rotate(3deg) translateX(4px); }
}

@keyframes bloom {
  from { letter-spacing: -0.05em; opacity: 0; }
  to   { letter-spacing: normal;  opacity: 1; }
}

/* ── Colour tokens ── */
:root,
:root.light,
:root:not(.light) {
  --default-color:    #2D1F2E;   /* deep aubergine-ink */
  --background-color: #FDF5F8;   /* parchment blush white */
  --default-shade:    #1E1020;   /* near-black with purple warmth */
  --default-tint:     #9B7A8B;   /* dusty mauve */
  --grey-1:           #B89AAA;   /* faded rose */
  --grey-2:           #E8C8D8;   /* petal pink border */
  --grey-3:           #F8EBF2;   /* soft cherry blossom */
  --grey-4:           #FDF5F8;   /* same as bg */
  --white:            #FDFAFC;
  --blue:             #C2678A;   /* muted rose — replaces the "blue" link color */
  --shadow-color:     rgba(45, 31, 46, 0.08);
  --code-color:       #B05070;
  --sakura:           #E8A0BC;   /* medium sakura pink */
  --sakura-deep:      #A3455F;   /* deep cranberry rose */
  --sakura-pale:      #FDE5EF;   /* mochi pink */
  --ink-blue:         #7B9EB5;   /* pale indigo-blue accent */
  --border:           #E8C8D8;
}

/* ── Background: parchment with scattered blossom suggestion ── */
html,
body {
  background-color: #FDF5F8;
  background-image:
    radial-gradient(ellipse 1px 1px at 15% 20%, rgba(232,160,188,0.25) 0%, transparent 100%),
    radial-gradient(ellipse 2px 2px at 72% 8%,  rgba(232,160,188,0.18) 0%, transparent 100%),
    radial-gradient(ellipse 1px 1px at 88% 45%, rgba(232,160,188,0.20) 0%, transparent 100%),
    radial-gradient(ellipse 2px 1px at 34% 78%, rgba(232,160,188,0.15) 0%, transparent 100%),
    radial-gradient(ellipse 1px 2px at 60% 92%, rgba(200,140,170,0.12) 0%, transparent 100%),
    radial-gradient(ellipse 1px 1px at 5%  60%, rgba(232,160,188,0.18) 0%, transparent 100%),
    /* subtle grain */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 200px 200px;
  color: #2D1F2E;
}

html {
  font-family: 'Lora', 'Noto Serif JP', Georgia, serif;
  font-size: 15px;
}

@media (min-width: 600px) {
  html { font-size: 17px; }
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #1E1020;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ── Links ── */
a {
  color: #C2678A;
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover,
a:focus {
  color: #A3455F;
  text-decoration: underline;
  text-decoration-color: #E8A0BC;
  text-underline-offset: 3px;
}

/* ── Navigation ── */
.nav {
  background-color: #FDF5F8;
  box-shadow: 0 1px 0 #E8C8D8;
}

.nav-container {
  padding: 1.8rem 0 1.2rem;
  text-align: center;
  animation: ink-appear 0.7s ease both;
}

/* Site title — personal hanko stamp feel */
.nav-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
  font-style: italic;
  color: #1E1020;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
}

/* Small sakura accent after the site name */
.nav-title::after {
  content: ' ✿';
  font-style: normal;
  font-size: 0.75em;
  color: #E8A0BC;
  display: inline-block;
  animation: petal-sway 4s ease-in-out infinite;
  transform-origin: bottom center;
}

.nav-title:hover,
.nav-title:focus {
  color: #A3455F;
  opacity: 1;
  text-decoration: none;
}

/* Nav links */
.nav ul {
  margin: 0.8rem 0 0;
}

.nav li {
  opacity: 1;
  color: #9B7A8B;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 1.6rem 0 0;
}

.nav li:last-child { padding-right: 0; }

.nav a {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9B7A8B;
  transition: color 0.2s;
}

.nav li:hover a,
.nav li:focus a {
  color: #A3455F;
}

/* Sakura ornament under nav */
.nav-container::after {
  content: '❀  ·  ❀';
  display: block;
  text-align: center;
  color: #D4A0B8;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  margin-top: 0.7rem;
  opacity: 0.65;
  font-family: sans-serif;
}

@media (min-width: 600px) {
  .nav-container       { text-align: left; }
  .nav-container::after { text-align: left; }
}

/* ── Post list (catalogue) ── */
.catalogue-item {
  border-bottom: 1px solid #EDD5E2;
  padding: 2.5rem 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalogue-item:hover {
  transform: translateY(-2px);
}

.catalogue-item:last-child { border-bottom: none; }

.catalogue-time {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #B89AAA;
  letter-spacing: 0.06em;
}

.catalogue-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
  font-style: italic;
  color: #1E1020;
  margin: 0.5rem 0 0.6rem;
  line-height: 1.35;
  transition: color 0.2s;
}

.catalogue-item:hover .catalogue-title,
.catalogue-title:hover {
  color: #A3455F;
}

/* Blooming underline on catalogue items */
.catalogue-line {
  border: none;
  border-top: 1px solid #E8A0BC;
  width: 1.8rem;
  transition: width 0.35s ease, border-color 0.35s ease;
}

.catalogue-item:hover .catalogue-line {
  width: 5rem;
  border-color: #C2678A;
}

/* ── Single post ── */
.post {
  padding: 3.5rem 0 5rem;
  animation: ink-appear 0.5s ease both;
}

.post-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  font-style: italic;
  color: #1E1020;
  line-height: 1.18;
  text-align: center;
  animation: bloom 0.6s ease both;
}

@media (min-width: 600px) {
  .post-title { font-size: 3.5rem; }
}

.post-info {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: #B89AAA;
  font-size: 0.83rem;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Sakura ornamental divider */
.post-line {
  border: none;
  height: 2rem;
  margin: 0.4rem auto 3rem;
  width: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-line::before {
  content: '❀  · · ·  ❀';
  color: #D4A0B8;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  font-family: sans-serif;
}

/* Drop cap — dusty rose */
.post > p:first-of-type::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 4.5rem;
  font-weight: 700;
  float: left;
  line-height: 0.76;
  margin: 0.12rem 0.14em 0 0;
  color: #C2678A;
  padding: 0.05em 0;
}

.post p {
  line-height: 1.9;
  margin: 0 0 1.3rem;
  color: #2D1F2E;
}

.post a:hover {
  text-decoration-color: #E8A0BC;
}

/* ── Blockquotes: soft sakura well ── */
blockquote {
  border-left: 2px solid #E8A0BC;
  background-color: #FDE5EF;
  background-image: linear-gradient(135deg, #FDE5EF 0%, #FDF5F8 100%);
  margin: 2.2rem 0;
  padding: 1.4rem 1.6rem 1.4rem 1.8rem;
  font-style: italic;
  color: #5A3B4E;
  border-radius: 0 8px 8px 0;
  position: relative;
}

blockquote::before {
  content: '✿';
  font-family: sans-serif;
  font-style: normal;
  font-size: 1.4rem;
  color: #E8A0BC;
  position: absolute;
  top: 0.9rem;
  left: -0.05rem;
  line-height: 1;
  opacity: 0.7;
}

blockquote p {
  margin: 0;
  padding-left: 0.4rem;
}

blockquote p:last-child { margin-bottom: 0; }

/* ── Tags: mochi pill style ── */
.tag,
a.tag {
  display: inline-block;
  background-color: #FDE5EF;
  border: 1px solid #E8C8D8;
  color: #9B5A72;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.70rem;
  font-style: italic;
  letter-spacing: 0.04em;
  padding: 0.22em 0.85em;
  border-radius: 999px;
  margin: 0.2rem 0.25rem 0.2rem 0;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  text-decoration: none;
}

.tag:hover,
a.tag:hover {
  background-color: #FBCFDF;
  border-color: #C2678A;
  color: #7A2E4A;
  transform: scale(1.06);
  text-decoration: none;
}

/* ── Code blocks ── */
code {
  font-size: 0.85em;
  background-color: #F8EBF2;
  color: #B05070;
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid #E8C8D8;
}

pre {
  background-color: #1E1020;
  border: 1px solid #E8C8D8;
  border-radius: 8px;
  padding: 1.3rem 1.5rem;
  overflow-x: auto;
  line-height: 1.65;
}

pre code {
  background: none;
  border: none;
  color: #F8EBF2;
  padding: 0;
  font-size: 0.85rem;
}

/* ── HR: soft sakura dots ── */
hr {
  border: none;
  text-align: center;
  margin: 3rem auto;
  color: #D4A0B8;
  letter-spacing: 0.5em;
  font-size: 0.75rem;
  font-family: sans-serif;
}

hr::before {
  content: '· · ·';
}

/* ── Footer ── */
footer {
  border-top: 1px solid #E8C8D8;
  color: #B89AAA;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  padding: 2.5rem 0 3rem;
  text-align: center;
}

footer span {
  color: #B89AAA;
  font-size: 0.76rem;
}

/* Small sakura at end of footer copyright */
footer span::after {
  content: '  ✿';
  color: #E8A0BC;
  font-style: normal;
  font-family: sans-serif;
}

/* ── Pagination ── */
.pagination {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.83rem;
  color: #9B7A8B;
}

.pagination a {
  color: #C2678A;
  border: 1px solid #E8C8D8;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.pagination a:hover {
  border-color: #C2678A;
  color: #A3455F;
  background-color: #FDE5EF;
  text-decoration: none;
}

/* ── Tables ── */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.8rem 0;
  font-size: 0.9rem;
}

th {
  background-color: #F8EBF2;
  color: #1E1020;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  padding: 0.7rem 0.9rem;
  border-bottom: 2px solid #E8C8D8;
  text-align: left;
  font-size: 0.9rem;
}

td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #EDD5E2;
  color: #2D1F2E;
}

tr:last-child td { border-bottom: none; }

/* ── Taxonomy term pages ── */
.terms {
  list-style: none;
  padding: 0;
}

.terms li {
  display: inline-block;
  margin: 0.3rem;
}

/* ── Image captions ── */
img + em {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: #B89AAA;
  font-style: italic;
  margin-top: -0.4rem;
  margin-bottom: 1.2rem;
}

/* ── Text selection ── */
::selection {
  background-color: rgba(232, 160, 188, 0.28);
  color: #1E1020;
}

/* ── Scrollbar: sakura pink ── */
::-webkit-scrollbar {
  width: 6px;
  background: #FDF5F8;
}

::-webkit-scrollbar-thumb {
  background: #E8C8D8;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C2678A;
}

/* ── Focus rings ── */
:focus-visible {
  outline: 2px solid #C2678A;
  outline-offset: 3px;
  border-radius: 3px;
}
