/*
Theme Name: Myth
Theme URI: https://example.com
Description: A clean minimal blog theme
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,800;1,400&family=Fredoka+One&display=swap');

:root {
  --ink: #2d2250;
  --paper: #fffdf6;
  --muted: #8b82b8;
  --line: #e8e0f5;
  --accent: #ff6b6b;
  --accent2: #ffd166;
  --accent3: #06d6a0;
  --accent4: #118ab2;
  --max: 740px;
  --wide: 1100px;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: 'Nunito', 'Comic Sans MS', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,209,102,0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(6,214,160,0.10) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255,107,107,0.06) 0%, transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HEADER ── */

#site-header {
  border-bottom: 3px solid var(--line);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  background: rgba(255,253,246,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}

#site-header .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

#site-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

#site-logo a {
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent), #ff8e53);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#site-nav {
  flex: 1;
}

#site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#site-nav ul li a {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all 0.2s;
  display: inline-block;
}

#site-nav ul li a:hover,
#site-nav ul li.current-menu-item a {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255,107,107,0.07);
}

#header-search {
  display: flex;
  align-items: center;
}

#header-search form {
  display: flex;
  align-items: center;
  background: var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  gap: 0.3rem;
}

#header-search input[type="search"] {
  border: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  color: var(--ink);
  width: 130px;
  outline: none;
}

#header-search input[type="search"]::placeholder {
  color: var(--muted);
}

#header-search button {
  border: none;
  background: var(--accent);
  cursor: pointer;
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: transform 0.15s, background 0.2s;
}

#header-search button:hover {
  background: #ff4f4f;
  transform: scale(1.05);
}

/* ── HOMEPAGE ── */

#home-posts {
  padding: 4rem 0 3rem;
}

#home-posts h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  color: var(--accent4);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#home-posts h2::before {
  content: '★';
  font-size: 1.1rem;
  color: var(--accent2);
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.post-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  transition: all 0.2s;
  cursor: pointer;
}

.post-list-item:hover {
  border-color: var(--accent2);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(255,209,102,0.2);
}

.post-list-item .post-date {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 80px;
}

.post-list-item .post-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  flex: 1;
}

.post-list-item .post-title a:hover { color: var(--accent); }

.post-list-item .post-cat {
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--accent3);
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.post-list-item:nth-child(3n) .post-cat { background: var(--accent); }
.post-list-item:nth-child(3n+2) .post-cat { background: var(--accent4); }

/* ── ABOUT SECTION ── */

#home-about {
  padding: 3rem 0 4.5rem;
}

#home-about .about-inner {
  background: #fff;
  border-radius: 24px;
  border: 2px solid var(--line);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

#home-about .about-inner::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,209,102,0.25) 0%, transparent 70%);
  pointer-events: none;
}

#home-about h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  color: var(--accent3);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#home-about h2::before { content: '♥'; font-size: 1.1rem; color: var(--accent3); }

#home-about .about-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink);
}

#home-about .about-content p + p { margin-top: 1em; }

/* ── FOOTER ── */

#site-footer {
  border-top: 3px dashed var(--line);
  padding: 2rem 0;
  margin-top: 1rem;
}

#site-footer .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

#footer-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#footer-nav ul li a {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  transition: all 0.2s;
  display: inline-block;
}

#footer-nav ul li a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

#footer-copy {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── SINGLE POST ── */

#single-post {
  padding: 3.5rem 0;
}

#single-post .post-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px dashed var(--line);
}

.post-header .post-meta {
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-header .post-meta a {
  background: var(--accent4);
  color: #fff;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.post-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

.post-content {
  font-size: 1rem;
  line-height: 1.9;
}

.post-content p { margin-bottom: 1.4em; }

.post-content h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent4);
  margin: 2.5em 0 0.7em;
}

.post-content h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--accent3);
  margin: 2em 0 0.5em;
}

.post-content ul, .post-content ol {
  padding-left: 1.6em;
  margin-bottom: 1.4em;
}

.post-content li { margin-bottom: 0.5em; }

.post-content blockquote {
  border-left: 4px solid var(--accent2);
  padding: 0.8rem 1.2rem;
  margin: 2em 0;
  background: rgba(255,209,102,0.12);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink);
}

.post-content a {
  color: var(--accent4);
  font-weight: 700;
  border-bottom: 2px solid rgba(17,138,178,0.3);
  transition: border-color 0.2s;
}

.post-content a:hover {
  border-color: var(--accent4);
}

.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: var(--line);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.post-content pre {
  background: var(--ink);
  color: #fff;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5em;
  border-radius: 16px;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ── RELATED POSTS ── */

#related-posts {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 2px dashed var(--line);
}

#related-posts h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#related-posts h3::before { content: '◆'; }

.related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-list li {
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  transition: all 0.2s;
}

.related-list li:hover {
  border-color: var(--accent2);
  transform: translateX(4px);
}

.related-list .rel-date {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.related-list a {
  font-weight: 700;
  font-size: 0.95rem;
}

.related-list a:hover { color: var(--accent); }

/* ── ARCHIVE / CATEGORY ── */

#archive-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 2px dashed var(--line);
  max-width: var(--max);
  margin: 0 auto;
}

#archive-header .archive-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

#archive-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--ink);
}

#archive-posts {
  padding: 1.5rem 0 4rem;
  max-width: var(--max);
  margin: 0 auto;
}

/* ── PAGINATION ── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 3rem 0 4rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.pagination .page-numbers:hover {
  border-color: var(--accent2);
  color: var(--ink);
  transform: scale(1.1);
}

.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.pagination .page-numbers.dots {
  border: none;
  color: var(--muted);
}

/* ── PAGE ── */

#page-content {
  padding: 3.5rem 0;
  max-width: var(--max);
  margin: 0 auto;
}

#page-content h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px dashed var(--line);
}

/* ── SEARCH RESULTS ── */

#search-results {
  padding: 3.5rem 0;
}

#search-results .search-header {
  max-width: var(--max);
  margin: 0 auto 2rem;
}

#search-results .search-header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
}

#search-results .search-header h1 span {
  color: var(--accent);
}

#search-results .post-list {
  max-width: var(--max);
  margin: 0 auto;
}

/* ── 404 ── */

#not-found {
  padding: 7rem 0;
  text-align: center;
}

#not-found .code {
  font-family: 'Fredoka One', cursive;
  font-size: 7rem;
  font-weight: 400;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

#not-found h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2rem;
}

#not-found a {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  padding: 0.7rem 2rem;
  border-radius: 999px;
  display: inline-block;
  transition: transform 0.2s, background 0.2s;
}

#not-found a:hover {
  background: #ff4f4f;
  transform: scale(1.05);
}

/* ── RESPONSIVE ── */

@media (max-width: 768px) {
  html { font-size: 16px; }

  #site-header .inner {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  #site-nav ul { gap: 0.3rem; flex-wrap: wrap; }

  #header-search input[type="search"] { width: 90px; }

  .post-list-item { flex-wrap: wrap; gap: 0.4rem; }
  .post-list-item .post-cat { margin-left: 0; }

  #site-footer .inner { flex-direction: column; gap: 1rem; text-align: center; }
  #footer-nav ul { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

  .post-header h1 { font-size: 1.5rem; }

  #home-about .about-inner { padding: 1.5rem; }
}
