/* ============================================
   Otters & Weasels - Hugo Theme
   Modernized from original WP design
   ============================================ */

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

:root {
  --color-accent: #d32f2f;
  --color-accent-hover: #b71c1c;
  --color-bg: #f0e8e8;
  --color-bg-bokeh: radial-gradient(ellipse at 20% 10%, rgba(210, 120, 120, 0.35) 0%, transparent 40%),
                    radial-gradient(ellipse at 80% 30%, rgba(190, 80, 80, 0.2) 0%, transparent 45%),
                    radial-gradient(ellipse at 40% 50%, rgba(140, 180, 170, 0.3) 0%, transparent 50%),
                    radial-gradient(ellipse at 90% 70%, rgba(60, 40, 60, 0.25) 0%, transparent 45%),
                    radial-gradient(ellipse at 60% 90%, rgba(40, 30, 50, 0.35) 0%, transparent 50%),
                    linear-gradient(160deg, #d4a0a0 0%, #c4aaaa 20%, #a8bcb6 45%, #7a8a8a 65%, #4a3a50 85%, #2d1f35 100%);
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-border: #e0e0e0;
  --color-nav-bg: #2c2c2c;
  --color-nav-text: #ffffff;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 4px;
  --container-width: 1140px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg-bokeh);
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
}

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

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

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

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

/* --- Header --- */
.site-header {
  text-align: center;
  background: #ffffff;
}

.header-bg {
  padding: 2rem 0 1.25rem;
  background: #ffffff;
}

.header-content {
  max-width: 700px;
  margin: 0 auto;
}

.logo-link {
  display: inline-block;
}

.header-logo {
  max-height: 260px;
  width: auto;
  margin: 0 auto;
}

.site-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* --- Navigation --- */
.main-nav {
  background: var(--color-nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 0;
}

.nav-menu li a {
  display: block;
  padding: 0.9rem 1.25rem;
  color: var(--color-nav-text);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background: var(--color-accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  flex-direction: column;
  gap: 5px;
}

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

/* --- Main Content Layout --- */
.site-main {
  padding: 2rem 0 3rem;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.content-area {
  min-width: 0;
}

/* --- Archive Title --- */
.archive-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-accent);
}

/* --- Post Card (List View) --- */
.post-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
  border-left: 4px solid var(--color-accent);
  transition: box-shadow 0.3s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
}

.post-date-badge {
  position: absolute;
  left: -4px;
  top: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 0.6rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  text-align: center;
  line-height: 1.2;
  z-index: 2;
  font-size: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.post-date-badge .month {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.post-date-badge .day {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.post-date-badge .year {
  display: block;
  font-size: 0.65rem;
  opacity: 0.85;
}

.post-thumbnail {
  display: block;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.03);
}

.post-card-content {
  padding: 1.5rem 1.75rem;
}

.post-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

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

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

.post-excerpt {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--color-accent-hover);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

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

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

.meta-author,
.meta-categories {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- Single Post --- */
.post-single {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  border-left: 4px solid var(--color-accent);
}

.post-single .post-date-badge {
  top: 1rem;
}

.post-hero img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.post-single .post-title {
  font-size: 2rem;
  padding: 1.5rem 1.75rem 0;
}

.single-meta {
  padding: 0.5rem 1.75rem 1rem;
}

.post-content {
  padding: 0 1.75rem 2rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-heading);
  margin: 1.75rem 0 0.75rem;
  line-height: 1.3;
}

.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem auto;
  box-shadow: var(--shadow-sm);
}

.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: #fafafa;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-light);
}

.post-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

/* Embeds */
.spotify-embed,
.soundcloud-embed {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.spotify-embed iframe,
.soundcloud-embed iframe {
  border-radius: var(--radius);
}

/* Post Tags */
.post-tags {
  padding: 1rem 1.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tags .tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.post-tags .tag:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

/* Post Navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
}

.post-nav a {
  max-width: 45%;
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: 4rem;
}

.widget {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-top: 3px solid var(--color-accent);
}

.widget h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.spotify-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
  font-size: 0.88rem;
  font-weight: 500;
}

.spotify-link svg {
  flex-shrink: 0;
}

.recent-posts {
  list-style: none;
}

.recent-posts li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.88rem;
}

.recent-posts li:last-child {
  border-bottom: none;
}

.recent-posts a {
  color: var(--color-text);
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-cloud .tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tag-cloud .tag:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.category-list {
  list-style: none;
}

.category-list li {
  padding: 0.35rem 0;
  font-size: 0.88rem;
}

.category-list a {
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
}

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

.category-list span {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 2rem 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.page-link:hover {
  background: var(--color-accent);
  color: #fff;
}

.page-link.current {
  background: var(--color-accent);
  color: #fff;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-nav-bg);
    box-shadow: var(--shadow-lg);
  }

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

  .main-nav .container {
    justify-content: flex-end;
    position: relative;
  }

  .nav-menu li a {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .post-thumbnail img {
    height: 200px;
  }

  .post-single .post-title {
    font-size: 1.5rem;
  }

  .header-logo {
    max-height: 180px;
  }
}

@media (max-width: 600px) {
  .post-card-content {
    padding: 1rem 1.25rem;
  }

  .post-content {
    padding: 0 1.25rem 1.5rem;
  }

  .post-single .post-title {
    padding: 1rem 1.25rem 0;
  }

  .post-title {
    font-size: 1.25rem;
  }

  .post-date-badge {
    font-size: 0.65rem;
    padding: 0.4rem 0.5rem;
  }

  .post-date-badge .day {
    font-size: 1.1rem;
  }
}
