/* ==========================================================================
   Blog Theme - inspired by janmontag.de
   Space Grotesk + Fira Mono, Pink Accent
   ========================================================================== */

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

:root {
  /* Colors - Light Mode */
  --color-bg: #ffffff;
  --color-bg-secondary: #f7f7f7;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-text-muted: #888888;
  --color-border: #e0e0e0;
  --color-accent: #FF1A75;
  --color-accent-hover: #e0156a;

  /* Typography */
  --font-headings: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Fira Mono", "SF Mono", Menlo, Monaco, Consolas, monospace;
  --font-size-base: 15px;
  --line-height: 1.7;

  /* Spacing */
  --padding: 1.5rem;
  --max-width: 520px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a2e;
    --color-bg-secondary: #252542;
    --color-text: #e2e8f0;
    --color-text-secondary: #a0aec0;
    --color-text-muted: #718096;
    --color-border: #3d3d5c;
    --color-accent: #FF1A75;
    --color-accent-hover: #ff4d94;
  }
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

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

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

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

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

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

strong, b {
  font-weight: 600;
}

small {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

::selection {
  background: var(--color-accent);
  color: white;
}

/* ==========================================================================
   Layout
   ========================================================================== */

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

/* ==========================================================================
   Header
   ========================================================================== */

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

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo:hover {
  opacity: 0.9;
}

.logo-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-headings);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-tagline {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.menu a {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
}

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

.menu a[aria-current] {
  color: var(--color-accent);
}

/* Social Icons */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

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

.social svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Text / Article Content
   ========================================================================== */

.text {
  line-height: var(--line-height);
}

.text > *:first-child {
  margin-top: 0;
}

.text > *:last-child {
  margin-bottom: 0;
}

.text p {
  margin-bottom: 1.5rem;
}

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

.text ul,
.text ol {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.text li {
  margin-bottom: 0.5rem;
}

.text ul > li {
  list-style: disc;
}

.text ol > li {
  list-style: decimal;
}

.text blockquote {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-secondary);
  font-style: italic;
}

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

.text code {
  font-family: var(--font-body);
  font-size: 0.9em;
  background: var(--color-bg-secondary);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.text pre {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.85rem;
}

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

.text hr {
  margin: 2.5rem 0;
  border: none;
  height: 1px;
  background: var(--color-border);
}

.text figure {
  margin: 2rem 0;
}

.text figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}


/* Gallery Grid */
.text figure ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.text figure ul li {
  list-style: none;
  margin: 0;
}

/* Tables */
.text table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.text th,
.text td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.text th {
  font-family: var(--font-headings);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Home / Blog List
   ========================================================================== */

.home h1 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-preview {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

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

.post-cover {
  display: block;
  margin-bottom: 1rem;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.15s ease;
}

.post-cover:hover img {
  opacity: 0.9;
}

.post-preview h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

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

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

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-meta .categories {
  color: var(--color-accent);
  text-transform: none;
  letter-spacing: 0;
}

.excerpt {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.read-more {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Article Page
   ========================================================================== */

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  margin-bottom: 0.5rem;
}

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.article-meta .categories {
  color: var(--color-accent);
  text-transform: none;
  letter-spacing: 0;
}

.article-cover {
  margin-bottom: 2rem;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
}

.article-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--padding);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-about {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
}

.footer-info h2 {
  font-size: 1rem;
  margin: 0 0 0.15rem;
}

.footer-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
  background: var(--color-bg-secondary);
  border-radius: 50%;
  transition: all 0.15s ease;
}

.footer-social a:hover {
  color: white;
  background: var(--color-accent);
}

.footer-social svg {
  width: 14px;
  height: 14px;
}

.footer-bottom {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.footer-bottom a {
  color: var(--color-text-muted);
}

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

/* Footer Search */
.footer-search h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  transition: border-color 0.15s ease;
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

.search-form input[type="search"]::placeholder {
  color: var(--color-text-muted);
}

.search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  color: white;
  background: var(--color-accent);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-form button:hover {
  background: var(--color-accent-hover);
}

/* Search Info */
.search-info {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Footer Categories */
.footer-categories h3,
.footer-tags h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-links a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  border-radius: 3px;
  transition: all 0.15s ease;
}

.category-links a:hover {
  color: white;
  background: var(--color-accent);
}

/* Tag Cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg-secondary);
  border-radius: 3px;
  transition: all 0.15s ease;
}

.tag-cloud a:hover {
  color: white;
  background: var(--color-accent);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 45%;
  text-decoration: none;
}

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

.post-nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.post-nav-title {
  font-family: var(--font-headings);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.post-navigation .next {
  text-align: right;
  margin-left: auto;
}

/* ==========================================================================
   Embeds
   ========================================================================== */

.video {
  position: relative;
  margin: 2rem 0;
  padding-bottom: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-bg-secondary);
}

.video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.wp-block-embed__wrapper {
  margin: 2rem 0;
}

.wp-block-embed__wrapper iframe[src*="spotify"] {
  border-radius: 12px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  font-size: 0.85rem;
  border-radius: 4px;
}

.pagination span {
  color: var(--color-text-muted);
}

.pagination span.current {
  background: var(--color-accent);
  color: white;
}

.pagination a {
  color: var(--color-text);
  background: var(--color-bg-secondary);
}

.pagination a:hover,
.pagination a[aria-current] {
  background: var(--color-accent);
  color: white;
}

/* ==========================================================================
   Comments Section
   ========================================================================== */

.comments-section {
  margin-top: 3rem;
}

.comments-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.comments-section h3 {
  font-size: 0.9rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

.webmentions-group,
.regular-comments {
  margin-bottom: 2rem;
}

/* Komments Plugin */
.komment {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.komment:last-child {
  border-bottom: none;
}

.komment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.komment-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.komment-author-name {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
}

.komment-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.komment-content {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.komments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.komments-form {
  margin-top: 1.5rem;
}

.komments-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-family: var(--font-headings);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.komments-form input[type="text"],
.komments-form input[type="email"],
.komments-form input[type="url"],
.komments-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.komments-form input:focus,
.komments-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.komments-form button[type="submit"] {
  display: inline-flex;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  background: var(--color-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.komments-form button[type="submit"]:hover {
  background: var(--color-accent-hover);
}

/* Likes/Reposts */
.likes-list,
.reposts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.likes-list img,
.reposts-list img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* Location/Map */
.location {
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--color-bg-secondary);
  border-radius: 4px;
}

.location h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.location p {
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.no-cover {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Legacy Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .grid > .column {
    grid-column: span var(--columns, 12);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  :root {
    --font-size-base: 14px;
    --padding: 1.25rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .logo-avatar {
    width: 48px;
    height: 48px;
  }

  .logo-name {
    font-size: 1.2rem;
  }

  .post-preview h2 {
    font-size: 1.2rem;
  }
}
