/* ===================================================
   GotOneForYa — Shared Stylesheet
   =================================================== */

/* --- CSS Custom Properties --- */
:root {
  --bg: #faf8f5;
  --bg-dark: #1a1714;
  --text: #1a1714;
  --text-light: #f5f0eb;
  --muted: #8a8078;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --warm: #f0e6d3;
  --gold: #f0c850;
  --bubble-bg: #1a1a1a;
  --bubble-sent: #007aff;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Base Typography --- */
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

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

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-logo {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 26px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--accent-hover); color: #fff !important; }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Footer --- */
.site-footer {
  padding: 60px 32px 40px;
  background: var(--bg-dark);
  color: rgba(245, 240, 235, 0.6);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand { margin-bottom: 24px; }

.footer-logo {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 28px;
  color: var(--text-light);
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 15px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: rgba(245, 240, 235, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-light); }

.footer-copy {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.4);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
}

.footer-copy a { color: var(--accent); }

/* --- CTA Button (shared) --- */
.cta-primary {
  display: inline-block;
  padding: 16px 40px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.cta-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  color: #fff;
}

/* --- Post / Page CTA block --- */
.post-cta {
  margin-top: 64px;
  padding: 40px;
  background: var(--bg-dark);
  border-radius: 16px;
  text-align: center;
  color: var(--text-light);
}

.post-cta h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* --- Prose (markdown content) --- */
.prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.prose h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.prose h3 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.prose p {
  margin-bottom: 20px;
}

.prose ul, .prose ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.prose strong { font-weight: 600; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.prose blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(240, 200, 80, 0.06);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}

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

.prose code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.prose pre {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.prose th, .prose td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-align: left;
}

.prose th {
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.prose img {
  border-radius: 12px;
  margin: 32px 0;
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 40px 0;
}

/* --- Blog Post Page --- */
.post-page {
  padding-top: 100px;
  padding-bottom: 80px;
}

.post-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

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

.post-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--warm);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

/* Post navigation (prev/next) */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.post-nav-link {
  text-decoration: none;
  padding: 20px;
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
  transition: background 0.2s;
}

.post-nav-link:hover { background: rgba(0,0,0,0.04); }

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

.post-nav-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.post-nav-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* --- Static Page --- */
.static-page {
  padding-top: 100px;
  padding-bottom: 80px;
}

.page-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

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

.page-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
}

/* --- Blog Index --- */
.blog-index {
  padding-top: 100px;
  padding-bottom: 80px;
}

.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}

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

.blog-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
}

.blog-header p {
  font-size: 17px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.post-card {
  padding: 32px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.post-card-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.post-card h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h2 a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- 404 Page --- */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
}

.error-page h1 {
  font-family: 'Caveat', cursive;
  font-size: 80px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-page p {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-nav { padding: 14px 20px; }
  .nav-logo { font-size: 22px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .nav-links.nav-open { display: flex; }

  .nav-cta { text-align: center; }

  .post-container, .page-container, .blog-container { padding: 0 20px; }

  .post-card { padding: 24px; }

  .post-nav {
    grid-template-columns: 1fr;
  }

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

  .post-cta { padding: 32px 24px; }
}
