/* ============================================
   Adventures of a Digital Privateer
   Theme: Privateer — clean editorial, coral accent
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --coral: #c94a3a;
  --coral-hover: #a83a2d;
  --text: #2a2a2a;
  --text-light: #6a6a6a;
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --border: #e8e8e8;
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 720px;
  --max-width-wide: 960px;
}

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

body {
  font-family: var(--font-serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: 2.2rem; margin-bottom: 0.5em; }
h2 { font-size: 1.6rem; margin-bottom: 0.4em; margin-top: 1.8em; }
h3 { font-size: 1.25rem; margin-bottom: 0.3em; margin-top: 1.4em; }

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

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

blockquote {
  border-left: 3px solid var(--coral);
  padding-left: 1.2em;
  margin: 1.5em 0;
  color: var(--text-light);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-subtle);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.2em;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* --- Layout --- */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

/* --- Header --- */
.site-header {
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.site-brand svg {
  width: 32px;
  height: 32px;
}

.site-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* --- Hero (homepage) --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 4rem 2.5rem;
  text-align: center;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--coral);
  max-width: 800px;
  line-height: 1.35;
}

@media (min-width: 768px) {
  .hero-tagline {
    font-size: 3rem;
  }
}

/* --- Navigation (bottom of homepage) --- */
.site-nav {
  text-align: center;
  padding: 2rem 0 3rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

/* --- Section/Archive pages --- */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coral);
}

.section-description {
  margin-top: 0.5em;
  color: var(--text-light);
  font-size: 1rem;
}

/* --- Post list --- */
.post-list {
  list-style: none;
}

.post-list-item {
  padding: 1.5em 0;
  border-bottom: 1px solid var(--border);
}

.post-list-item:first-child {
  padding-top: 0;
}

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

.post-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

.post-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.2em;
}

.post-title a {
  color: var(--text);
}

.post-title a:hover {
  color: var(--coral);
}

.post-excerpt {
  margin-top: 0.4em;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Single post --- */
.post-header {
  margin-bottom: 2rem;
}

.post-header .post-title {
  font-size: 2rem;
  margin-bottom: 0.3em;
}

.post-header .post-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-light);
}

.post-body {
  font-size: 1.05rem;
}

.post-body p {
  margin-bottom: 1.3em;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5em 0;
}

.post-body ul, .post-body ol {
  margin: 1em 0 1em 1.5em;
}

.post-body li {
  margin-bottom: 0.4em;
}

/* --- Tags --- */
.post-tags {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border);
}

.tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--bg-subtle);
  padding: 0.25em 0.7em;
  border-radius: 3px;
  margin-right: 0.4em;
}

.tag:hover {
  color: var(--coral);
  background: #fef2f0;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* --- Inner page nav (top, for non-home pages) --- */
.inner-nav {
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inner-nav ul {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}

.inner-nav a {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.inner-nav a:hover {
  color: var(--coral);
}

/* --- Responsive --- */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .hero { min-height: 50vh; padding: 3rem 1.5rem; }
  .hero-tagline { font-size: 1.8rem; }

  .site-header { padding: 1.5rem; }
  .site-nav ul { gap: 1.5rem; flex-wrap: wrap; }
  .inner-nav { padding: 1rem 1.5rem; }
  .inner-nav ul { gap: 1rem; }

  .page-container { padding: 2rem 1.5rem; }
}
