/*
Theme Name: Rose Learns To Code
Theme URI: https://roselearnstocode.com
Author: Rose
Description: Personal learning blog theme — dark, minimal, monospace.
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #0c0c0f;
  --surface: #13131a;
  --surface2: #1a1a24;
  --accent: #7c6af7;
  --accent2: #f76a8c;
  --accent3: #6af7c8;
  --text: #e8e8f0;
  --muted: #7070a0;
  --border: #2a2a3a;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 106, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 106, 247, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent2);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Layout ─────────────────────────────────────── */

.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ─── Hero / Header ──────────────────────────────── */

.site-hero {
  padding: 100px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.site-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  margin-bottom: 28px;
  box-shadow: 0 0 0 4px rgba(124, 106, 247, 0.12);
}

.site-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 14px;
}

.site-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-tagline {
  color: var(--muted);
  font-size: 12px;
  max-width: 400px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

/* ─── Divider ────────────────────────────────────── */

.section-divider {
  max-width: 680px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.section-divider hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* ─── Recent Posts ───────────────────────────────── */

.recent-posts {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 100px;
  width: 100%;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.post-list {
  list-style: none;
  display: grid;
  gap: 2px;
}

.post-list-item a {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.post-list-item a:hover {
  border-color: rgba(124, 106, 247, 0.4);
  background: var(--surface2);
  color: var(--text);
}

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

.post-number {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding-top: 2px;
  min-width: 24px;
  flex-shrink: 0;
}

.post-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
}

.post-arrow {
  color: var(--muted);
  font-size: 12px;
  padding-top: 2px;
  transition: color 0.2s;
  flex-shrink: 0;
}

/* ─── Footer ─────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

/* ─── Responsive ─────────────────────────────────── */

@media (max-width: 480px) {
  .site-hero {
    padding: 72px 24px 60px;
  }

  .post-list-item a {
    padding: 16px;
  }
}

/* ─── Single Post ─────────────────────────────────── */

.single-post-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.post-header {
  margin-bottom: 48px;
}

.post-meta-top {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-sep {
  color: var(--border);
}

.post-cat {
  color: var(--accent);
}

.post-title-single {
  font-family: 'Syne', sans-serif;
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

/* ─── Post Content Typography ────────────────────── */

.post-content {
  color: var(--text);
  font-size: 13px;
  line-height: 1.9;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 16px;
  color: var(--text);
}

.post-content h2 { font-size: 22px; }
.post-content h3 { font-size: 18px; }
.post-content h4 { font-size: 15px; }

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.post-content ul,
.post-content ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content code {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--accent3);
}

.post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--accent3);
}

.post-content blockquote {
  border-left: 2px solid var(--accent);
  margin: 0 0 24px;
  padding: 4px 0 4px 20px;
  color: var(--muted);
  font-style: italic;
}

.post-content img {
  border-radius: 6px;
  margin: 24px 0;
  border: 1px solid var(--border);
  max-width: 100%;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ─── Post Nav ───────────────────────────────────── */

.post-nav {
  display: flex;
  gap: 2px;
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.post-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.post-nav-link:hover {
  border-color: rgba(124, 106, 247, 0.4);
  background: var(--surface2);
}

.post-nav-link--next {
  text-align: right;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* ─── Archive / Search Extras ────────────────────── */

.post-date-inline {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

.no-results {
  color: var(--muted);
  font-size: 12px;
  margin-top: 24px;
}

/* ─── Pagination ─────────────────────────────────── */

.pagination {
  margin-top: 40px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: rgba(124, 106, 247, 0.4);
  color: var(--accent);
}

/* ─── Search Form ────────────────────────────────── */

.search-form {
  margin-bottom: 8px;
}

.search-input-wrap {
  display: flex;
  gap: 2px;
}

.search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px 0 0 4px;
  padding: 12px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: rgba(124, 106, 247, 0.5);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 4px 4px 0;
  padding: 12px 20px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.search-btn:hover {
  background: var(--surface2);
  color: var(--accent2);
}

/* ─── Comments ───────────────────────────────────── */

.comments-wrap {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.comment-list {
  list-style: none;
  display: grid;
  gap: 2px;
  margin-bottom: 40px;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
}

.comment-body-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-author-info img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.comment-author-name {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.comment-author-name a {
  color: var(--text);
  text-decoration: none;
}

.comment-date {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.comment-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
}

.comment-text p {
  margin-bottom: 10px;
}

.comment-reply a {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.comment-reply a:hover {
  color: var(--accent);
}

.comment-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 20px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: rgba(124, 106, 247, 0.5);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form .search-btn {
  border-left: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 24px;
}

/* ─── Responsive ─────────────────────────────────── */

@media (max-width: 480px) {
  .site-hero {
    padding: 72px 24px 60px;
  }

  .post-list-item a {
    padding: 16px;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-link--next {
    text-align: left;
  }

  .comment-date {
    display: none;
  }
}
