/* Jorge M. Reverte — light redesign (Mistylook-inspired) */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --green: #265e15;
  --green-dark: #1a420e;
  --green-soft: #3a7a28;
  --ink: #1c1c1c;
  --muted: #555;
  --paper: #f7f5ef;
  --paper-2: #efebe0;
  --line: #d4cec0;
  --white: #fff;
  --link: #1f5a9a;
  --max: 960px;
  --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top, rgba(38, 94, 21, 0.06), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 245, 239, 0.85));
  border-bottom: 1px solid var(--line);
}

.site-brand {
  padding: 28px 0 18px;
  text-align: center;
  animation: fadeUp 0.7s ease both;
  background: #fff;
}

.site-brand a {
  color: var(--green-dark);
  text-decoration: none;
}

.site-brand .site-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--green-dark);
}

.site-brand .site-tagline {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--green);
  font-weight: 400;
}

.site-hero {
  height: 180px;
  background: #2a2a2a url('/assets/img/header.jpg') center / cover no-repeat;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  animation: fadeIn 1s ease both;
}

/* Nav */
.site-nav {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.site-nav a {
  display: block;
  padding: 12px 16px;
  color: #f4f8f1;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 100%;
  border: 0;
  background: var(--green-dark);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}

/* Layout */
.site-main {
  flex: 1;
  padding: 28px 0 48px;
}

.layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.layout-content {
  flex: 1 1 auto;
  min-width: 0;
}

.layout-aside {
  flex: 0 0 240px;
  font-size: 0.95rem;
}

.page-header {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-dark);
  line-height: 1.3;
}

.page-meta {
  margin: 8px 0 0;
  color: #444;
  font-size: 0.92rem;
}

/* Cards / posts */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.post-card {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  animation: fadeUp 0.5s ease both;
}

.post-card h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
}

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

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

.post-card .excerpt {
  margin: 10px 0 0;
  color: #333;
}

.aside-box {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.aside-box h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--green);
}

.aside-box ul {
  margin: 0;
  padding-left: 18px;
}

.aside-box li {
  margin-bottom: 6px;
}

.aside-avatar {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--line);
}

/* Blog listing from r-template_blog */
.blog-container {
  width: 100%;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.blog-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.blog-title a {
  color: var(--green-dark);
}

.blog-preview p {
  margin: 0;
  color: var(--muted);
}

/* Content area */
.romlicontainer {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  padding: 22px 24px;
}

.romlicontainer p {
  margin: 0 0 14px;
}

.ebook-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.ebook-grid a {
  display: block;
  transition: transform 0.2s ease;
}

.ebook-grid a:hover {
  transform: translateY(-3px);
}

.ebook-grid img {
  width: 120px;
  height: auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 24px 0 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 12px;
}

.site-footer a {
  color: var(--green);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }

  .layout-aside {
    flex: 1 1 auto;
    width: 100%;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav ul {
    display: none;
    flex-direction: column;
  }

  .site-nav.is-open ul {
    display: flex;
  }

  .site-hero {
    height: 120px;
  }

  .romlicontainer {
    padding: 16px;
  }
}
